diff --git a/apps/member/views.py b/apps/member/views.py index 2bc2133c862bde58afd03f7cfa9a2a9b63a8a68e..066a7ef33f0f528bc1edddcedf9628425b88572c 100644 --- a/apps/member/views.py +++ b/apps/member/views.py @@ -8,7 +8,6 @@ from django.contrib.auth import logout from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from django.contrib.auth.views import LoginView -from django.contrib.contenttypes.models import ContentType from django.db import transaction from django.db.models import Q, F from django.shortcuts import redirect diff --git a/apps/note/tables.py b/apps/note/tables.py index 0a0fd4ed183bccd11d7692faf895da671fd0953e..11d8ba783a36201da1718637f7bbe9378eb2bf45 100644 --- a/apps/note/tables.py +++ b/apps/note/tables.py @@ -172,6 +172,7 @@ class TrustTable(tables.Table): else '')}}, verbose_name=_("Delete"),) + class TrustedTable(tables.Table): class Meta: attrs = { @@ -184,7 +185,7 @@ class TrustedTable(tables.Table): show_header = False trusting = tables.Column(attrs={ - 'td': {'class': 'text-center', 'width':'100%'}}) + 'td': {'class': 'text-center', 'width': '100%'}}) trust_back = tables.Column( verbose_name=_("Trust back"), @@ -200,7 +201,7 @@ class TrustedTable(tables.Table): def render_trust_back(self, record): user_note = record.trusted trusting_note = record.trusting - if Trust.objects.filter(trusted=trusting_note, trusting=user_note) : + if Trust.objects.filter(trusted=trusting_note, trusting=user_note): return "" val = '<button id="' val += str(record.pk) diff --git a/apps/treasury/models.py b/apps/treasury/models.py index fc20da3bcb9e5d98a5c2e8c7d413769fe3c2487c..e788e47929af92afb1821cefc23ae1434d2fe6ba 100644 --- a/apps/treasury/models.py +++ b/apps/treasury/models.py @@ -338,11 +338,11 @@ class SogeCredit(models.Model): # if m.transaction not in self.transactions.all(): # self.transactions.add(m.transaction) # -# if kfet_qs.exists(): -# m = kfet_qs.get() -# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership -# if m.transaction not in self.transactions.all(): -# self.transactions.add(m.transaction) +# if kfet_qs.exists(): +# m = kfet_qs.get() +# if MembershipTransaction.objects.filter(membership=m).exists(): # non-free membership +# if m.transaction not in self.transactions.all(): +# self.transactions.add(m.transaction) if 'wei' in settings.INSTALLED_APPS: from wei.models import WEIClub