From 5c612c8fa564760916f7b010e6a6fe8213858986 Mon Sep 17 00:00:00 2001 From: Parbhat Puri <parbhatpuri17@gmail.com> Date: Fri, 22 Feb 2019 15:17:25 +0000 Subject: [PATCH] fix flake8 issues --- opentech/apply/categories/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentech/apply/categories/models.py b/opentech/apply/categories/models.py index d15bc4f85..81ce64591 100644 --- a/opentech/apply/categories/models.py +++ b/opentech/apply/categories/models.py @@ -115,7 +115,7 @@ class MetaCategoryForm(WagtailAdminModelForm): super().__init__(*args, **kwargs) instance = kwargs['instance'] - if instance.is_root() or MetaCategory.objects.count() is 0: + if instance.is_root() or MetaCategory.objects.count() == 0: self.fields['parent'].disabled = True self.fields['parent'].required = False self.fields['parent'].empty_label = 'N/A - Root Category' @@ -133,7 +133,7 @@ class MetaCategoryForm(WagtailAdminModelForm): return instance if instance.id is None: - if MetaCategory.objects.all().count() is 0: + if MetaCategory.objects.all().count() == 0: MetaCategory.add_root(instance=instance) else: instance = parent.add_child(instance=instance) -- GitLab