mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-01-04 07:03:14 +08:00
minor bug fix get_tags
This commit is contained in:
parent
90f836205b
commit
c68051a6eb
1 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ class Config:
|
|||
tags['new_tag'] = self.util.check_for_attribute(self.data, tag_url, parent="tags",default=default_tag)
|
||||
self.util.check_for_attribute(self.data, "tag", parent="tags",subparent=tag_url, default=tags['new_tag'],do_print=False)
|
||||
if tags['new_tag'] == default_tag:
|
||||
if self.data["tags"][tag_url] is None: self.data["tags"][tag_url] = {}
|
||||
self.data["tags"][tag_url] = {}
|
||||
self.data['tags'][tag_url]['tag'] = default_tag
|
||||
# Using Format 2
|
||||
else:
|
||||
|
@ -143,7 +143,7 @@ class Config:
|
|||
if tags['url']:
|
||||
default_tag = tags['url'].split('/')[2].split(':')[0]
|
||||
tags['new_tag'] = self.util.check_for_attribute(self.data, "tag", parent="tags",subparent=default_tag, default=default_tag)
|
||||
if self.data["tags"][default_tag] is None: self.data["tags"][default_tag] = {}
|
||||
if default_tag not in self.data["tags"] or self.data["tags"][default_tag] is None: self.data["tags"][default_tag] = {}
|
||||
self.data['tags'][default_tag]['tag'] = default_tag
|
||||
logger.warning(f'No tags matched for {tags["url"]}. Please check your config.yml file. Setting tag to {default_tag}')
|
||||
return (tags)
|
||||
|
|
Loading…
Reference in a new issue