You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
it should return the tracking details even without auth
api | ERROR exceptions.py 49 Field 'id' expected a number but got <django.contrib.auth.models.AnonymousUser object at 0x7f7ac3f03610>.
api | Traceback (most recent call last):
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/fields/__init__.py", line 2053, in get_prep_value
api | return int(value)
api | File "/karrio/venv/lib/python3.10/site-packages/django/contrib/auth/models.py", line 437, in __int__
api | raise TypeError(
api | TypeError: Cannot cast AnonymousUser to int. Are you trying to use it in place of User?
api |
api | The above exception was the direct cause of the following exception:
api |
api | Traceback (most recent call last):
api | File "/karrio/venv/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
api | response = handler(request, *args, **kwargs)
api | File "/karrio/venv/lib/python3.10/site-packages/karrio/server/manager/views/trackers.py", line 255, in get
api | return Response(serializers.TrackingStatus(trackers.first()).data)
api | File "/karrio/venv/lib/python3.10/site-packages/rest_framework/serializers.py", line 555, in data
api | ret = super().data
api | File "/karrio/venv/lib/python3.10/site-packages/rest_framework/serializers.py", line 253, in data
api | self._data = self.to_representation(self.instance)
api | File "/karrio/venv/lib/python3.10/site-packages/rest_framework/serializers.py", line 509, in to_representation
api | attribute = field.get_attribute(instance)
api | File "/karrio/venv/lib/python3.10/site-packages/rest_framework/fields.py", line 446, in get_attribute
api | return get_attribute(instance, self.source_attrs)
api | File "/karrio/venv/lib/python3.10/site-packages/rest_framework/fields.py", line 96, in get_attribute
api | instance = getattr(instance, attr)
api | File "/karrio/venv/lib/python3.10/site-packages/karrio/server/manager/models.py", line 547, in carrier_name
api | return typing.cast(Carrier, self.tracking_carrier).data.carrier_name
api | File "/karrio/venv/lib/python3.10/site-packages/karrio/server/providers/models/carrier.py", line 149, in data
api | config=getattr(self.config, "config", None),
api | File "/karrio/venv/lib/python3.10/site-packages/karrio/server/providers/models/carrier.py", line 199, in config
api | config = self.__class__.resolve_config(self)
api | File "/karrio/venv/lib/python3.10/site-packages/karrio/server/providers/models/carrier.py", line 241, in resolve_config
api | return queryset.filter(
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1436, in filter
api | return self._filter_or_exclude(False, args, kwargs)
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1454, in _filter_or_exclude
api | clone._filter_or_exclude_inplace(negate, args, kwargs)
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1461, in _filter_or_exclude_inplace
api | self._query.add_q(Q(*args, **kwargs))
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1534, in add_q
api | clause, _ = self._add_q(q_object, self.used_aliases)
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1565, in _add_q
api | child_clause, needed_inner = self.build_filter(
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1480, in build_filter
api | condition = self.build_lookup(lookups, col, value)
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1307, in build_lookup
api | lookup = lookup_class(lhs, rhs)
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/lookups.py", line 27, in __init__
api | self.rhs = self.get_prep_lookup()
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/fields/related_lookups.py", line 166, in get_prep_lookup
api | self.rhs = target_field.get_prep_value(self.rhs)
api | File "/karrio/venv/lib/python3.10/site-packages/django/db/models/fields/__init__.py", line 2055, in get_prep_value
api | raise e.__class__(
api | TypeError: Field 'id' expected a number but got <django.contrib.auth.models.AnonymousUser object at 0x7f7ac3f03610>.
api | ERROR log.py 241 Internal Server Error: /v1/trackers/trk_e8d2773e1e85466099f32f08db104797
The text was updated successfully, but these errors were encountered:
Describe the bug
the api to get tracking id return the following error:
To Reproduce
Steps to reproduce the behavior:
do i get with a valid tracking_id http://localhost:5002/v1/trackers/trk_8f3b5d329864483f82d2c55d98774607
Expected behavior
it should return the tracking details even without auth
The text was updated successfully, but these errors were encountered: