Skip to content

Commit

Permalink
Merge branch 'django-kobocat-app' into refactor-kobo-docker-env-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
noliveleger committed Jun 17, 2024
2 parents f4c4b04 + d12339e commit 29f51a3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion hub/tests/test_admin_validators.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from constance import config
from django.contrib.auth.models import User
from django.test import TestCase

from hub.admin.extend_user import validate_superuser_auth
from kobo.apps.accounts.mfa.models import MfaMethod
from kobo.apps.kobo_auth.shortcuts import User


class ValidateSuperuserMfaTest(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion kobo/apps/project_ownership/serializers/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def validate_assets(self, asset_uids: list[str]) -> list[Asset]:

return assets

def validate_recipient(self, user: 'auth.User') -> 'auth.User':
def validate_recipient(self, user: 'kobo_auth.User') -> 'kobo_auth.User':
if self.instance is None:
return user

Expand Down
2 changes: 1 addition & 1 deletion kobo/apps/trash_bin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def move_to_trash(
Projects and accounts stay in trash for `grace_period` and then are
hard-deleted when their related scheduled task runs.
If `retain_placeholder` is True, in instance of `auth.User` with the same
If `retain_placeholder` is True, in instance of `kobo_auth.User` with the same
username and primary key is retained after deleting all other data.
"""

Expand Down
2 changes: 1 addition & 1 deletion kpi/deployment_backends/base_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def sync_media_files(self, file_type: str = AssetFile.FORM_MEDIA):
pass

@abc.abstractmethod
def transfer_counters_ownership(self, new_owner: 'auth.User'):
def transfer_counters_ownership(self, new_owner: 'kobo_auth.User'):
pass

@abc.abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion kpi/deployment_backends/kobocat_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ def transfer_submissions_ownership(
)
)

def transfer_counters_ownership(self, new_owner: 'auth.User'):
def transfer_counters_ownership(self, new_owner: 'kobo_auth.User'):

NLPUsageCounter.objects.filter(
asset=self.asset, user=self.asset.owner
Expand Down
2 changes: 1 addition & 1 deletion kpi/deployment_backends/mock_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def sync_media_files(self, file_type: str = AssetFile.FORM_MEDIA):
for obj in queryset:
assert issubclass(obj.__class__, SyncBackendMediaInterface)

def transfer_counters_ownership(self, new_owner: 'auth.User'):
def transfer_counters_ownership(self, new_owner: 'kobo_auth.User'):
NLPUsageCounter.objects.filter(
asset=self.asset, user=self.asset.owner
).update(user=new_owner)
Expand Down

0 comments on commit 29f51a3

Please sign in to comment.