aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/models.py b/models.py
index 536c3b8..85d340c 100644
--- a/models.py
+++ b/models.py
@@ -57,7 +57,7 @@ class Group(models.Model):
def save(self):
try:
- parts = self.name.split("-")[-2:]
+ parts = self.celcat_name.split("-")[-2:]
group = parts[1].strip()[2:]
self.mention = parts[0].strip()
@@ -68,9 +68,9 @@ class Group(models.Model):
if len(group) > 2:
self.tp = int(group[2])
except:
- print("Malformed name: {0}. Ignoring".format(self.name))
+ print("Malformed name: {0}. Ignoring".format(self.celcat_name))
finally:
- if self.name is None:
+ if self.name == "":
self.name = self.celcat_name
self.slug = slugify(self.name)