|
|
@@ -554,7 +554,7 @@ class ObjectStore(object): |
|
|
|
session.execute(delete(orm.UUIDv5Table).where( |
|
|
|
orm.UUIDv5Table.uuid == obj.id)) |
|
|
|
|
|
|
|
for j in obj.hashes: |
|
|
|
for j in obj.get('hashes', []): |
|
|
|
h = self.makehash(j) |
|
|
|
session.execute(delete(orm.HashTable).where( |
|
|
|
orm.HashTable.hash == h and |
|
|
@@ -1039,12 +1039,16 @@ def cmd_modify(options, persona, objstr, cache): |
|
|
|
for i in options.files: |
|
|
|
#print('a:', repr(i), file=_real_stderr) |
|
|
|
|
|
|
|
try: |
|
|
|
objs = objstr.get_metadata(i, persona) |
|
|
|
#print('d:', repr(i), repr(objs), file=_real_stderr) |
|
|
|
except FileNotFoundError: |
|
|
|
print('ERROR: file not found: %s, or invalid tag specification.' % repr(i), file=sys.stderr) |
|
|
|
sys.exit(1) |
|
|
|
if i.startswith('uuid:'): |
|
|
|
obj = objstr.by_id(i[5:]) |
|
|
|
objs = [ obj ] |
|
|
|
else: |
|
|
|
try: |
|
|
|
objs = objstr.get_metadata(i, persona) |
|
|
|
#print('d:', repr(i), repr(objs), file=_real_stderr) |
|
|
|
except FileNotFoundError: |
|
|
|
print('ERROR: file not found: %s, or invalid tag specification.' % repr(i), file=sys.stderr) |
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
|
|
for j in objs: |
|
|
|