Skip to content

Commit

Permalink
Fix remapped variable
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Aug 11, 2023
1 parent 7ab0f29 commit 9066957
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/api-server/api_server/models/building_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def from_tortoise(tortoise: ttm.BuildingMap) -> "BuildingMap":

async def save(self) -> None:
existing_maps = await ttm.BuildingMap.all()
for map in existing_maps:
if map.id_ != self.name:
await map.delete()
for m in existing_maps:
if m.id_ != self.name:
await m.delete()
await ttm.BuildingMap.update_or_create({"data": self.dict()}, id_=self.name)

0 comments on commit 9066957

Please sign in to comment.