Return empty change set
This commit is contained in:
@@ -17,11 +17,11 @@ def _get_junction(name: str, id: str) -> Row | None:
|
||||
|
||||
def delete_junction(name: str, id: str) -> ChangeSet:
|
||||
if not is_junction(name, id):
|
||||
return
|
||||
return ChangeSet()
|
||||
|
||||
row = _get_junction(name, id)
|
||||
if row == None:
|
||||
return
|
||||
return ChangeSet()
|
||||
|
||||
elevation = row['elevation']
|
||||
demand = utility.decorate(row['demand'], 'float', True)
|
||||
@@ -60,11 +60,11 @@ def get_junction_coord(name: str, id: str) -> dict[str, float] | None:
|
||||
|
||||
def _set_junction(name: str, id: str, key: str, key_type: str, value: str, optional: bool = False) -> ChangeSet:
|
||||
if not is_junction(name, id):
|
||||
return
|
||||
return ChangeSet()
|
||||
|
||||
row = _get_junction(name, id)
|
||||
if row == None:
|
||||
return
|
||||
return ChangeSet()
|
||||
|
||||
return utility.update(name, JUNCTION, 'junctions', 'id', id, key, key_type, row[key], value, optional)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user