hooks: fix no json.loads user tags on discover

This commit is contained in:
norohind 2022-04-20 22:27:21 +03:00
parent 01a5590f7a
commit 819fb93861
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

View File

@ -28,6 +28,7 @@ class UpdateRuSquad(Hook):
def update(self, operation_id: int, last_records: list[dict]) -> None:
if len(last_records) == 1:
# Squad just discovered
last_records[0]['user_tags'] = json.loads(last_records[0]['user_tags'])
record = last_records[0]
if '32' in record['user_tags']:
message = f"""