Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #383 from SELab-2/development
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
Joris-Peeters authored May 21, 2023
2 parents 8b8c67e + bb101d0 commit 9e243dd
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions backend/drtrottoir/management/commands/mockdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,16 @@ def local_image_path_to_django_image_data(image_path: str) -> File:
]

garbage = [
"Rest",
"GFT",
"Glas",
"PMD",
"KGA",
"Nucleair",
"Rest (In)",
"Rest (Out)",
"GFT (In)",
"GFT (Out)",
"Glas (In)",
"Glas (Out)",
"PMD (In)",
"PMD (Out)",
"KGA (In)",
"KGA (Out)",
]

building_images = [
Expand Down Expand Up @@ -572,14 +576,28 @@ def handle(self, *args, **options):

# Add garbage schedules
for building in buildings_in_schedule_definition_of_0:
garbage_collection_schedule_1 = GarbageCollectionSchedule(
for_day=date, building=building, garbage_type=garbage_types[0]
)
garbage_collection_schedule_2 = GarbageCollectionSchedule(
garbage_collection_schedule_1_in = GarbageCollectionSchedule(
for_day=date, building=building, garbage_type=garbage_types[1]
)
garbage_collection_schedule_1.save()
garbage_collection_schedule_2.save()
garbage_collection_schedule_1_out = GarbageCollectionSchedule(
for_day=datetime.datetime.strptime(date, "%Y-%m-%d")
+ datetime.timedelta(days=1),
building=building,
garbage_type=garbage_types[0],
)
garbage_collection_schedule_2_in = GarbageCollectionSchedule(
for_day=date, building=building, garbage_type=garbage_types[3]
)
garbage_collection_schedule_2_out = GarbageCollectionSchedule(
for_day=datetime.datetime.strptime(date, "%Y-%m-%d")
+ datetime.timedelta(days=1),
building=building,
garbage_type=garbage_types[2],
)
garbage_collection_schedule_1_in.save()
garbage_collection_schedule_1_out.save()
garbage_collection_schedule_2_in.save()
garbage_collection_schedule_2_out.save()

# Add work entries
work_entries = []
Expand Down

0 comments on commit 9e243dd

Please sign in to comment.