Skip to content

Commit

Permalink
#2 #7 небольшое украшательство
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteApfel committed Oct 14, 2021
1 parent c7c62f2 commit 99e6c77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions raiffather/models/c2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def __getitem__(self, item):
found.append(c)
if len(found) == 1:
return found[0]

if found:
raise RaifFoundMoreThanOneProduct(item, found, self.cards)
raise RaifProductNotFound(item, self.cards)
Expand Down
1 change: 1 addition & 0 deletions raiffather/models/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def __getitem__(self, item):
found.append(a)
if len(found) == 1:
return found[0]

if found:
raise RaifFoundMoreThanOneProduct(item, found, self.cards)
raise RaifProductNotFound(item, self.cards)
Expand Down

0 comments on commit 99e6c77

Please sign in to comment.