git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9c98e9
)
also preserve slice tags for deleted slices
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Mon, 14 Oct 2024 17:46:36 +0000
(19:46 +0200)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Mon, 14 Oct 2024 17:46:36 +0000
(19:46 +0200)
PLC/Slices.py
patch
|
blob
|
history
diff --git
a/PLC/Slices.py
b/PLC/Slices.py
index
276754c
..
9705a01
100644
(file)
--- a/
PLC/Slices.py
+++ b/
PLC/Slices.py
@@
-254,8
+254,8
@@
class Slice(Row):
assert 'slice_id' in self
# Clean up miscellaneous join tables
- # however, we want to preserve leases for accounting purposes
- to_delete = [table for table in self.join_tables if table
!= 'leases'
]
+ # however, we want to preserve leases
as well as slice tags
for accounting purposes
+ to_delete = [table for table in self.join_tables if table
not in {'leases', 'slice_tag'}
]
for table in to_delete:
self.api.db.do(
f"DELETE FROM {table} WHERE slice_id = {self['slice_id']}")