Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcd7441

Browse files
author
deathnfudge
committed
Fixed spacing issues in cdc.py file.
1 parent 3a6b1ca commit dcd7441

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

quickbooks/cdc.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,33 @@
55

66

77
def change_data_capture(qbo_class_list, timestamp, qb=None):
8-
if qb is None:
9-
qb = QuickBooks()
8+
if qb is None:
9+
qb = QuickBooks()
1010

11-
cdc_class_dict = dict((cls.qbo_object_name, cls) for cls in qbo_class_list)
11+
cdc_class_dict = dict((cls.qbo_object_name, cls) for cls in qbo_class_list)
1212

13-
cdc_class_names = list(cdc_class_dict.keys())
14-
entity_list_string = ','.join(cdc_class_names)
13+
cdc_class_names = list(cdc_class_dict.keys())
14+
entity_list_string = ','.join(cdc_class_names)
1515

16-
if isinstance(timestamp, datetime):
17-
timestamp_string = qb_datetime_format(timestamp)
18-
else:
19-
timestamp_string = timestamp
16+
if isinstance(timestamp, datetime):
17+
timestamp_string = qb_datetime_format(timestamp)
18+
else:
19+
timestamp_string = timestamp
2020

21-
resp = qb.change_data_capture(entity_list_string, timestamp_string)
21+
resp = qb.change_data_capture(entity_list_string, timestamp_string)
2222

23-
cdc_response_dict = resp.pop('CDCResponse')
24-
cdc_response = CDCResponse.from_json(resp)
23+
cdc_response_dict = resp.pop('CDCResponse')
24+
cdc_response = CDCResponse.from_json(resp)
2525

26-
query_response_list = cdc_response_dict[0]['QueryResponse']
27-
for query_response_dict in query_response_list:
28-
qb_object_name = [x for x in query_response_dict if x in cdc_class_names][0]
29-
qb_object_list = query_response_dict.pop(qb_object_name)
30-
qb_object_cls = cdc_class_dict[qb_object_name]
26+
query_response_list = cdc_response_dict[0]['QueryResponse']
27+
for query_response_dict in query_response_list:
28+
qb_object_name = [x for x in query_response_dict if x in cdc_class_names][0]
29+
qb_object_list = query_response_dict.pop(qb_object_name)
30+
qb_object_cls = cdc_class_dict[qb_object_name]
3131

32-
query_response = QueryResponse.from_json(query_response_dict)
33-
query_response._object_list = [qb_object_cls.from_json(obj) for obj in qb_object_list]
32+
query_response = QueryResponse.from_json(query_response_dict)
33+
query_response._object_list = [qb_object_cls.from_json(obj) for obj in qb_object_list]
3434

35-
setattr(cdc_response, qb_object_name, query_response)
35+
setattr(cdc_response, qb_object_name, query_response)
3636

37-
return cdc_response
37+
return cdc_response

0 commit comments

Comments
 (0)