Skip to content

Commit b80f793

Browse files
authored
Merge pull request #32 from bugout-dev/dont_except_for_empty_app_list
Removed exception if app list empty
2 parents 83902c8 + 16ff5ac commit b80f793

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

brood/actions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def generate_verification_code(
342342
if randint_generator is None:
343343
randint_generator = randint
344344

345-
verification_code_int = randint_generator(0, 10 ** 6 - 1)
345+
verification_code_int = randint_generator(0, 10**6 - 1)
346346
verification_code_raw = str(verification_code_int)
347347
verification_code = f"{'0'*(6 - len(verification_code_raw))}{verification_code_raw}"
348348
return verification_code
@@ -1653,9 +1653,6 @@ def get_applications(
16531653

16541654
applications = query.all()
16551655

1656-
if len(applications) == 0:
1657-
raise exceptions.ApplicationsNotFound("There are no applications found")
1658-
16591656
return applications
16601657

16611658

brood/api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,8 +1900,6 @@ async def list_applications_handler(
19001900

19011901
try:
19021902
applications = actions.get_applications(db_session, groups_ids=groups_ids)
1903-
except exceptions.ApplicationsNotFound:
1904-
raise HTTPException(status_code=404, detail="There are no applications")
19051903
except Exception as e:
19061904
raise HTTPException(status_code=500)
19071905

brood/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Brood library and API version.
33
"""
44

5-
BROOD_VERSION = "0.2.1"
5+
BROOD_VERSION = "0.2.2"

0 commit comments

Comments
 (0)