Skip to content

Commit

Permalink
Squash migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-Jess committed Nov 17, 2024
1 parent 93987c2 commit 42b84a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 33 deletions.
11 changes: 2 additions & 9 deletions backend/laundry/management/commands/update_laundry_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,7 @@ def handle(self, *args, **kwargs):
if room_request_json is None:
return
# count washers and dryers
count_washers = 0
count_dryers = 0
for machine in room_request_json:
if machine["isWasher"]:
count_washers += 1
if machine["isDryer"]:
count_dryers += 1
room["count_washers"] = count_washers
room["count_dryers"] = count_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"]])

write_file(laundry_rooms)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.0.2 on 2024-09-29 06:49
# Generated by Django 5.0.2 on 2024-11-17 18:04

from django.db import migrations, models

Expand All @@ -24,9 +24,4 @@ class Migration(migrations.Migration):
name="location_id",
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name="laundryroom",
name="new",
field=models.BooleanField(default=False),
),
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.0.2 on 2024-11-17 01:04
# Generated by Django 5.0.2 on 2024-11-17 18:04

from django.db import migrations, models

Expand Down
17 changes: 0 additions & 17 deletions backend/laundry/migrations/0005_remove_laundryroom_new.py

This file was deleted.

0 comments on commit 42b84a2

Please sign in to comment.