Process all initial tags in one call
This commit is contained in:
parent
340b3dda89
commit
05f52bbdeb
2 changed files with 8 additions and 8 deletions
|
|
@ -128,9 +128,7 @@ class ListAPI(MicroscopeView):
|
|||
bayer=bayer)
|
||||
|
||||
output.put_metadata(metadata)
|
||||
|
||||
for tag in tags:
|
||||
output.put_tag(str(tag))
|
||||
output.put_tags(tags)
|
||||
|
||||
return jsonify(output.state)
|
||||
|
||||
|
|
|
|||
|
|
@ -264,16 +264,18 @@ class CaptureObject(object):
|
|||
return False
|
||||
|
||||
# HANDLE TAGS
|
||||
def put_tag(self, tag: str):
|
||||
def put_tags(self, tags: list):
|
||||
"""
|
||||
Add a new tag to the ``tags`` list attribute.
|
||||
|
||||
Args:
|
||||
tag (str): Tag to be added
|
||||
tag (list): List of tags to be added
|
||||
"""
|
||||
if not tag in self.tags:
|
||||
self.tags.append(tag)
|
||||
self.save_metadata()
|
||||
for tag in tags:
|
||||
if not tag in self.tags:
|
||||
self.tags.append(tag)
|
||||
|
||||
self.save_metadata()
|
||||
|
||||
def delete_tag(self, tag: str):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue