mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-23 12:06:43 +00:00
fix: reset in_rescore flag after re-save
Ensure the recursion guard only applies to the nested save() and is cleared afterwards, so a later save() on the same doc instance still creates periods. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,10 @@ class SupplierScorecard(Document):
|
||||
if make_all_scorecards(self.name) > 0:
|
||||
# New periods were created; re-save to refresh score and standings.
|
||||
self.flags.in_rescore = True
|
||||
self.save()
|
||||
try:
|
||||
self.save()
|
||||
finally:
|
||||
self.flags.in_rescore = False
|
||||
|
||||
def validate_standings(self):
|
||||
# Standings must form a continuous chain of bands covering 0 to 100 with no gaps or overlaps
|
||||
|
||||
Reference in New Issue
Block a user