Skip to content

Commit

Permalink
fix price only one ref validation
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Feb 4, 2024
1 parent 997a04a commit 319ae84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sc_crawler/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ class Price(SQLModel, table=True):
def server_or_traffic_or_storage(self) -> "Price":
if (self.server_id is None) + (self.traffic_id is None) + (
self.storage_id is None
) != 1:
raise ValueError("One Server, Traffic or Storage required.")
) != 2:
raise ValueError("Exactly one Server, Traffic or Storage required.")
return self


Expand Down

0 comments on commit 319ae84

Please sign in to comment.