ae-utbm / sith

🌐 The website of the AE
https://ae-utbm.github.io/sith/
GNU General Public License v3.0
6 stars 4 forks source link

TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' #90

Closed Juknum closed 2 years ago

Juknum commented 4 years ago

In GitLab by @sentry on Dec 16, 2019, 01:45

https://ae2.utbm.fr/equipe_info/sith/issues/290/ Happens with anonymous users, really easy to fix ;)

TypeError: int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject'
(14 additional frame(s) were not displayed)
...
  File "django/db/models/sql/query.py", line 1116, in build_lookup
    lookup = lookup_class(lhs, rhs)
  File "django/db/models/lookups.py", line 20, in __init__
    self.rhs = self.get_prep_lookup()
  File "django/db/models/fields/related_lookups.py", line 59, in get_prep_lookup
    self.rhs = [target_field.get_prep_value(v) for v in self.rhs]
  File "django/db/models/fields/related_lookups.py", line 59, in <listcomp>
    self.rhs = [target_field.get_prep_value(v) for v in self.rhs]
  File "django/db/models/fields/__init__.py", line 972, in get_prep_value
    return int(value)
Juknum commented 4 years ago

In GitLab by @sli on Dec 17, 2019, 12:03

closed via merge request !263

Juknum commented 4 years ago

In GitLab by @sli on Dec 17, 2019, 12:03

mentioned in commit 9176a03a8ab9cc3e82f2521ffff8f95565fd2959