I've got an app running on Heroku with Django, the local DB I use SQLite, but on Heroku the app uses PostgreSQL.
I'm having a problem and I've no idea why is happening. Let me explain myself:
I select an object from DB by it's id, locally it works perfectly, but on Heroku, the result is that it cannot find the object.
I know that the id of the object is correct, and the way I'm trying to select the object is the same as the way I did dozens of times.
Here's the code that haves the issue:
data = simplejson.loads(request.raw_post_data)
if 'id' and 'type' in data:
ide=data['id']
type=data['type']
if type == 'selection':
if ObjSel.objects.filter(id=ide).exists():
ej = ObjSel.objects.get(id=ide)
[....]
else:
return HttpResponse(
simplejson.dumps({'result': 'fail', 'message': 'Object not found'}),
mimetype='application/json'
)
Hope you can help me.