Skip to content

Commit 4a211dc

Browse files
committed
Merge branch 'main' of github.com:Yuval-Roth/ims_project into flour_mill
2 parents fde3c81 + 7481062 commit 4a211dc

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

manager/src/app.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,18 @@ def main_menu():
4545
def get_parts():
4646
online_participants_ids = get_participants() # Replace with your function to fetch participants
4747
all_participants = get_participants_for_view()
48-
# participants = None
49-
# if not participants:
50-
# participants = PARTICIPANTS
5148

52-
if len(online_participants_ids) > 0 and not isinstance(online_participants_ids[0], dict):
49+
if len(online_participants_ids) > 0 and all_participants:
5350
# make every id in the list, from a '003' to '3'
5451
online_participants_ids = [int(x) for x in online_participants_ids]
5552

5653
online_participants = []
5754
for part in all_participants:
58-
# convert from string to dict
5955
part = json.loads(part)
6056
if part['pid'] in online_participants_ids:
57+
part['id'] = str(part['pid']).zfill(3)
6158
online_participants.append(part)
62-
59+
print(f"online_participants: {online_participants}")
6360
return jsonify(online_participants)
6461
return jsonify(all_participants)
6562

0 commit comments

Comments
 (0)