1👍
✅
More info will certainly be useful (database schema, User model code) but this’ll get you exception text (something along the lines “User matching query does not exist. Lookup parameters were {‘uniq_hashed’: ‘c9b8568a4c19e74b5bddd05bd71caac1’}”).
try:
user = User.objects.get(uniq_hashed__exact=hash_id)
except User.DoesNotExist as exc:
message = str(exc)
Source:stackexchange.com