Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
fixed #285 TypeError: object of type 'NoneType' has no len()
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxMaSk committed Apr 18, 2018
1 parent eeb1a3d commit a909604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_th/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def get_tags(model, trigger_id):
trigger = model.objects.get(trigger_id=trigger_id)

tags = ''
if len(trigger.tag) > 0:
if trigger.tag:
# is there several tag ?
tags = ["#" + tag.strip() for tag in trigger.tag.split(',')]
tags = str(','.join(tags)) if isinstance(tags, list) else tags
Expand Down

0 comments on commit a909604

Please sign in to comment.