don't mark deleted if alarm or edge already marked
Change-Id: Ia68a8d3a8bbdc15aa311b53f6251a927792ccd1b
This commit is contained in:
parent
902f472451
commit
48988837dc
@ -50,10 +50,14 @@ def is_deleted(item):
|
||||
|
||||
def mark_deleted(g, item):
|
||||
if isinstance(item, Vertex):
|
||||
if item.get(VProps.VITRAGE_IS_DELETED, False):
|
||||
return
|
||||
item[VProps.VITRAGE_IS_DELETED] = True
|
||||
item[VProps.VITRAGE_SAMPLE_TIMESTAMP] = str(utcnow())
|
||||
g.update_vertex(item)
|
||||
elif isinstance(item, Edge):
|
||||
if item.get(EProps.VITRAGE_IS_DELETED, False):
|
||||
return
|
||||
item[EProps.VITRAGE_IS_DELETED] = True
|
||||
item[EProps.UPDATE_TIMESTAMP] = str(utcnow())
|
||||
g.update_edge(item)
|
||||
|
Loading…
Reference in New Issue
Block a user