Support SA

This commit is contained in:
WQY\qiong
2023-05-16 21:30:23 +08:00
parent 47d2fe9ddd
commit 6046cdf01a
10 changed files with 434 additions and 34 deletions

View File

@@ -7,7 +7,7 @@ def get_district_metering_area_schema(name: str) -> dict[str, dict[str, Any]]:
return { 'id' : {'type': 'str' , 'optional': False , 'readonly': True },
'boundary' : {'type': 'tuple_list' , 'optional': False , 'readonly': False },
'parent' : {'type': 'str' , 'optional': True , 'readonly': False },
'level' : {'type': 'str' , 'optional': False , 'readonly': True } }
'level' : {'type': 'int' , 'optional': False , 'readonly': True } }
def get_district_metering_area(name: str, id: str) -> dict[str, Any]:
@@ -29,7 +29,7 @@ def get_district_metering_area(name: str, id: str) -> dict[str, Any]:
return dma
# no update for nodes
def _set_district_metering_area(name: str, cs: ChangeSet) -> DbChangeSet:
id = cs.operations[0]['id']