Skip to content

Commit 7356918

Browse files
committed
Fix for unit test
1 parent 2328350 commit 7356918

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

celeryconfig.example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## Celery configuration
88

99
# List of modules to import when celery starts.
10-
imports = ("tasks.timeline", "tasks.counts", "tasks.migration", "tasks.transcode", "tasks.delete_account")
10+
imports = ("tasks.timeline", "tasks.counts", "tasks.migration", "tasks.transcode", "tasks.admin")
1111

1212
task_routes = {
1313
"tasks.transcode.*": { "queue": "transcode" },

handlers/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from models import Sharedfile, User, Shake, Invitation, Waitlist, ShakeCategory, \
99
DmcaTakedown, Comment, Favorite, PaymentLog, Conversation
1010
from lib.utilities import send_slack_notification, pretty_date
11-
from tasks.delete_account import delete_account
11+
from tasks.admin import delete_account
1212

1313

1414
class AdminBaseHandler(BaseHandler):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ def delete_account(user_id=0, **kwargs):
1010
1111
"""
1212
user = User.get('id = %s', user_id)
13-
if not user or user.is_admin or user.deleted == 0:
13+
if not user or user.is_admin() or user.deleted == 0:
1414
return
1515
user.delete()

0 commit comments

Comments
 (0)