Skip to content

Commit

Permalink
refactor: set values at appropriate place (LAN-85)
Browse files Browse the repository at this point in the history
  • Loading branch information
scdanieli committed Aug 21, 2023
1 parent 6fa17ba commit 585c8e6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions landa/water_body_management/stocking_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@

class StockingController(Document):
def before_validate(self):
pass
self.set_weight_per_size()
self.set_quantity_per_size()
self.set_total_price()

def validate(self):
self.validate_year()
self.validate_own_regional_organization()
self.validate_own_water_body()
self.set_weight_per_size()
self.set_quantity_per_size()
self.set_total_price()

def validate_year(self):
if not EARLIEST_YEAR < self.year < LATEST_YEAR:
Expand Down

0 comments on commit 585c8e6

Please sign in to comment.