Skip to content

Commit

Permalink
fix(utils): Update Mapping import
Browse files Browse the repository at this point in the history
Remove deprecation and make it work with Python 3.10.

Closes hiimdoublej#22
  • Loading branch information
denisroldan committed Feb 1, 2022
1 parent 651fdd4 commit e95da7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_json_ld/util.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import collections
from collections.abc import Mapping

from django.utils.functional import Promise
from django.utils.encoding import force_text
from django.core.serializers.json import DjangoJSONEncoder


def validate_sd(sd):
if sd and not isinstance(sd, collections.Mapping):
if sd and not isinstance(sd, Mapping):
err = 'Invalid type for provided structured data, expected "dict", got {}'.format(type(sd))
return False, err
return True, None
Expand Down

0 comments on commit e95da7e

Please sign in to comment.