damn_server.area.UpdateArea¶
- class damn_server.area.UpdateArea(*, aid, tags=None, priority=None, description=None, instructions=None)¶
Bases:
BaseModel
Structure for storing information about the area being updated.
For more descriptive information see CreateArea. This class differs from the CreateArea in two things:
aid
MUST 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
instructions
of the area9999
, so I need toPUT
:{ aid: 9999, instructions: {} }
When the area is updated, new commit is automatically created with
null
square id, containing the information about the area being changed in themessage
. This enables the rollback procedure, used for restoring the area from the commits.