mirror of
https://github.com/etesync/server
synced 2024-11-24 01:38:18 +00:00
Small fixup to make it run.
This commit is contained in:
parent
5b80564601
commit
002cb05982
@ -11,7 +11,6 @@ from etebase_server.myauth.models import UserType, get_typed_user_model
|
|||||||
|
|
||||||
from .db_hack import django_db_cleanup_decorator
|
from .db_hack import django_db_cleanup_decorator
|
||||||
from .exceptions import AuthenticationFailed
|
from .exceptions import AuthenticationFailed
|
||||||
from .utils import get_object_or_404
|
|
||||||
|
|
||||||
User = get_typed_user_model()
|
User = get_typed_user_model()
|
||||||
token_scheme = APIKeyHeader(name="Authorization")
|
token_scheme = APIKeyHeader(name="Authorization")
|
||||||
@ -75,6 +74,8 @@ def get_collection_queryset(user: UserType = Depends(get_authenticated_user)) ->
|
|||||||
|
|
||||||
@django_db_cleanup_decorator
|
@django_db_cleanup_decorator
|
||||||
def get_collection(collection_uid: str, queryset: QuerySet = Depends(get_collection_queryset)) -> models.Collection:
|
def get_collection(collection_uid: str, queryset: QuerySet = Depends(get_collection_queryset)) -> models.Collection:
|
||||||
|
from .utils import get_object_or_404
|
||||||
|
|
||||||
return get_object_or_404(queryset, uid=collection_uid)
|
return get_object_or_404(queryset, uid=collection_uid)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user