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)
|
bayer=bayer)
|
||||||
|
|
||||||
output.put_metadata(metadata)
|
output.put_metadata(metadata)
|
||||||
|
output.put_tags(tags)
|
||||||
for tag in tags:
|
|
||||||
output.put_tag(str(tag))
|
|
||||||
|
|
||||||
return jsonify(output.state)
|
return jsonify(output.state)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -264,16 +264,18 @@ class CaptureObject(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# HANDLE TAGS
|
# HANDLE TAGS
|
||||||
def put_tag(self, tag: str):
|
def put_tags(self, tags: list):
|
||||||
"""
|
"""
|
||||||
Add a new tag to the ``tags`` list attribute.
|
Add a new tag to the ``tags`` list attribute.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
tag (str): Tag to be added
|
tag (list): List of tags to be added
|
||||||
"""
|
"""
|
||||||
if not tag in self.tags:
|
for tag in tags:
|
||||||
self.tags.append(tag)
|
if not tag in self.tags:
|
||||||
self.save_metadata()
|
self.tags.append(tag)
|
||||||
|
|
||||||
|
self.save_metadata()
|
||||||
|
|
||||||
def delete_tag(self, tag: str):
|
def delete_tag(self, tag: str):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue