Changeset bd1554a in flexoentity
- Timestamp:
- 11/19/25 14:00:35 (8 weeks ago)
- Branches:
- master
- Children:
- d825c6b
- Parents:
- 3cf10cb
- File:
-
- 1 edited
-
flexoentity/flexo_entity.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flexoentity/flexo_entity.py
r3cf10cb rbd1554a 359 359 """ 360 360 361 allowed = self.allowed_transitions() 362 363 if target_state.name not in allowed: 361 if target_state not in self.allowed_transitions(): 364 362 raise ValueError( 365 363 f"Illegal state transition: {self.state.name} → {target_state.name}. " 366 f"Allowed: {', '.join( allowed) or 'none'}"364 f"Allowed: {', '.join([each.name for each in self.allowed_transitions()]) or 'none'}" 367 365 ) 368 366 … … 441 439 then performs a version bump and lineage update. 442 440 """ 443 allowed = self.allowed_transitions() 444 if "PUBLISHED" not in allowed: 441 if EntityState.PUBLISHED not in self.allowed_transitions(): 445 442 raise ValueError( 446 443 f"Illegal state transition: {self.state.name} → PUBLISHED. " 447 f"Allowed: {', '.join( allowed) or 'none'}"444 f"Allowed: {', '.join([each.name for each in self.allowed_transitions()]) or 'none'}" 448 445 ) 449 446 … … 463 460 """I mark myself as obsolete""" 464 461 allowed = self.allowed_transitions() 465 if "OBSOLETE" not in allowed:462 if EntityState.OBSOLETE not in self.allowed_transitions(): 466 463 raise ValueError( 467 464 f"Illegal state transition: {self.state.name} -> OBSOLETE. " 468 f"Allowed: {', '.join( allowed) or 'none'}"465 f"Allowed: {', '.join([each.name for each in self.allowed_transitions()]) or 'none'}" 469 466 ) 470 467 if self.state != EntityState.OBSOLETE:
Note:
See TracChangeset
for help on using the changeset viewer.
