Skip to content

Commit

Permalink
[refactor] reverted function deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatDevourer committed Jan 25, 2024
1 parent f6ea6a7 commit 8815b13
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions App/controllers/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ def get_lockers_in_area(id):
raise("Area does not exist")
return area.getLockersInArea()

def get_area_by_description(description):
areas = Area.query.filter(Area.description.contains(description)).all()
if not areas:
return None
return areas

def get_area_by_description_toJSON(description):
areas = get_area_by_description(description)
if not areas:
return None
return [a.toJSON() for a in areas]


def set_description(id,new_description):
area = get_area_by_id(id)
Expand Down

0 comments on commit 8815b13

Please sign in to comment.