Skip to content

[hotfix] GrasSim: management 'days_since_rotation' update

Summary

On rotationType = 'frequency', days_since_rotation is not updated (+= 1) if day is outside of a rotation period.

Steps to reproduce

use a management.yaml file with 'rotationType: Value: frequency' and more than one rotation period.

Example Project

/

What is the current bug behavior?

days_since_rotation is not updated (+= 1) if day is outside of a rotation period.

What is the expected correct behavior?

days_since_rotation is updated (+= 1) if day is outside of a rotation period.

Relevant logs and/or screenshots

/

Possible fixes

https://gitlab.uliege.be/deal-public/pase/-/blame/develop/MODULES/CROPS/GRASSIM/management/management.py?ref_type=heads#L199

  • Place return False after the for loop.
  • Add self.days_since_rotation += 1 before return False