Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jul 31, 2024
1 parent 3304fce commit 0c5e6c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 1 addition & 5 deletions core/common/checksums.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import hashlib
import json
from uuid import UUID

from django.conf import settings
from django.db import models
from pydash import get
from ocldev.checksum import Checksum as ChecksumBase
from pydash import get


class ChecksumModel(models.Model):
Expand Down
8 changes: 4 additions & 4 deletions core/common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from drf_yasg.utils import swagger_auto_schema
from elasticsearch import RequestError, TransportError
from elasticsearch_dsl import Q
from pydash import get, compact, flatten
from pydash import get, compact
from rest_framework import response, generics, status
from rest_framework.generics import ListAPIView, RetrieveUpdateDestroyAPIView
from rest_framework.permissions import AllowAny, IsAuthenticated
Expand All @@ -31,8 +31,7 @@
from core.common.serializers import RootSerializer
from core.common.swagger_parameters import all_resource_query_param
from core.common.utils import compact_dict_by_values, to_snake_case, parse_updated_since_param, \
to_int, get_falsy_values, get_truthy_values, get_resource_class_from_resource_name, \
format_url_for_search
to_int, get_falsy_values, get_truthy_values, format_url_for_search
from core.concepts.permissions import CanViewParentDictionary, CanEditParentDictionary
from core.orgs.constants import ORG_OBJECT_TYPE
from core.users.constants import USER_OBJECT_TYPE
Expand Down Expand Up @@ -1124,7 +1123,8 @@ def post(self, request):
if not resource or not data:
return Response({'error': 'resource and data are both required.'}, status=status.HTTP_400_BAD_REQUEST)

return Response(ChecksumModel.generate_checksum_from_many(resource, request.data, 'smart' if self.smart else 'standard'))
return Response(
ChecksumModel.generate_checksum_from_many(resource, request.data, 'smart' if self.smart else 'standard'))


class StandardChecksumView(AbstractChecksumView):
Expand Down
1 change: 0 additions & 1 deletion core/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.contrib.auth.password_validation import validate_password
from django.core.exceptions import ValidationError
from django.db import models
from pydash import get
from rest_framework.authtoken.models import Token

from core.common.mixins import SourceContainerMixin
Expand Down

0 comments on commit 0c5e6c7

Please sign in to comment.