diff --git a/backend/laundry/management/commands/update_laundry_rooms.py b/backend/laundry/management/commands/update_laundry_rooms.py index 193f1100..a2be0195 100644 --- a/backend/laundry/management/commands/update_laundry_rooms.py +++ b/backend/laundry/management/commands/update_laundry_rooms.py @@ -45,7 +45,11 @@ def handle(self, *args, **kwargs): if room_request_json is None: return # count washers and dryers - room["count_washers"] = len([machine for machine in room_request_json if machine["isWasher"]]) - room["count_dryers"] = len([machine for machine in room_request_json if machine["isDryer"]]) + room["count_washers"] = len( + [machine for machine in room_request_json if machine["isWasher"]] + ) + room["count_dryers"] = len( + [machine for machine in room_request_json if machine["isDryer"]] + ) write_file(laundry_rooms)