|
@@ 767-784 (lines=18) @@
|
| 764 |
|
rows_spaces = cursor.fetchall() |
| 765 |
|
|
| 766 |
|
result = list() |
| 767 |
|
if rows_spaces is not None and len(rows_spaces) > 0: |
| 768 |
|
for row in rows_spaces: |
| 769 |
|
timezone = timezone_dict.get(row['timezone_id'], None) |
| 770 |
|
contact = contact_dict.get(row['contact_id'], None) |
| 771 |
|
cost_center = cost_center_dict.get(row['cost_center_id'], None) |
| 772 |
|
parent_space = space_dict.get(row['parent_space_id'], None) |
| 773 |
|
meta_result = {"id": row['id'], |
| 774 |
|
"name": row['name'], |
| 775 |
|
"uuid": row['uuid'], |
| 776 |
|
"parent_space": parent_space, |
| 777 |
|
"area": row['area'], |
| 778 |
|
"timezone": timezone, |
| 779 |
|
"is_input_counted": bool(row['is_input_counted']), |
| 780 |
|
"is_output_counted": bool(row['is_output_counted']), |
| 781 |
|
"contact": contact, |
| 782 |
|
"cost_center": cost_center, |
| 783 |
|
"description": row['description']} |
| 784 |
|
result.append(meta_result) |
| 785 |
|
|
| 786 |
|
cursor.close() |
| 787 |
|
cnx.disconnect() |
|
@@ 82-99 (lines=18) @@
|
| 79 |
|
rows_spaces = cursor.fetchall() |
| 80 |
|
|
| 81 |
|
result = list() |
| 82 |
|
if rows_spaces is not None and len(rows_spaces) > 0: |
| 83 |
|
for row in rows_spaces: |
| 84 |
|
timezone = timezone_dict.get(row['timezone_id'], None) |
| 85 |
|
contact = contact_dict.get(row['contact_id'], None) |
| 86 |
|
cost_center = cost_center_dict.get(row['cost_center_id'], None) |
| 87 |
|
parent_space = space_dict.get(row['parent_space_id'], None) |
| 88 |
|
meta_result = {"id": row['id'], |
| 89 |
|
"name": row['name'], |
| 90 |
|
"uuid": row['uuid'], |
| 91 |
|
"parent_space": parent_space, |
| 92 |
|
"area": row['area'], |
| 93 |
|
"timezone": timezone, |
| 94 |
|
"is_input_counted": bool(row['is_input_counted']), |
| 95 |
|
"is_output_counted": bool(row['is_output_counted']), |
| 96 |
|
"contact": contact, |
| 97 |
|
"cost_center": cost_center, |
| 98 |
|
"description": row['description']} |
| 99 |
|
result.append(meta_result) |
| 100 |
|
|
| 101 |
|
cursor.close() |
| 102 |
|
cnx.disconnect() |