damn_server.area.UpdateArea¶
- class damn_server.area.UpdateArea(*, aid, tags=None, priority=None, description=None, instructions=None)¶
Bases:
BaseModelStructure for storing information about the area being updated.
For more descriptive information see CreateArea. This class differs from the CreateArea in two things:
aidMUST be set.Nothing else matters. You can skip anything. (Usually, you change one thing anyway.)
NOTE: The information updated MUST be present. If not, it is untouched in the database. If you want to delete something, provide the null value to the property.
Example: I want to delete all the
instructionsof the area9999, so I need toPUT:{ aid: 9999, instructions: {} }
When the area is updated, new commit is automatically created with
nullsquare id, containing the information about the area being changed in themessage. This enables the rollback procedure, used for restoring the area from the commits.