mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 01:58:54 +02:00
feat(accounts): add option for untracking accounts on a per user basis
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from apps.transactions.models import Transaction
|
||||
from apps.common.middleware.thread_local import get_current_user
|
||||
from apps.common.models import SharedObject, SharedObjectManager
|
||||
from apps.transactions.models import Transaction
|
||||
|
||||
|
||||
class AccountGroup(SharedObject):
|
||||
@@ -80,7 +80,8 @@ class Account(SharedObject):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def is_untracked_by(self, user):
|
||||
def is_untracked_by(self):
|
||||
user = get_current_user()
|
||||
return self.untracked_by.filter(pk=user.pk).exists()
|
||||
|
||||
def clean(self):
|
||||
|
||||
Reference in New Issue
Block a user