Thanks Ken for your quickness :)

So, it looks like this behaviour is happening because of the
CurrentSiteManager:
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/managers.py#L365

I have to dig deeper into Mezzanine's docs to see what I missed to that
caused this problem.

Cheers!

On 13 February 2018 at 16:34, Ken Bolton <[email protected]> wrote:

> Hi all,
>
> I've been talking with Majd on the IRC channel for a few days about this.
> Perhaps he'll chime in with his solution and the steps he took to get
> there, but the short of it was that his production environment had a
> different site_id and so the queries were not finding the content even
> though the content was visible in the DB and admin.
>
> - ken
>
> On Tue, Feb 13, 2018 at 7:00 AM, Majd Al-shihabi <[email protected]>
> wrote:
>
>> Hi everyone - It's been a few days of me trying to debug this problem, to
>> no avail. The behaviour that I'm experiencing is very peculiar, and  I'd
>> really appreciate tips on where to look to debug it. Here's the problem
>> description, narrowed down as much as can narrow it:
>>
>>    - I have two models, one inherits from Displayable, the other from
>>    Django's own models.Model. Querying the one that inherits from Displayable
>>    always returns an empty queryset in the three models that I have in my
>>    project.
>>    - I've created a new model that has the exact same code as one of the
>>    problematic models, just with a different name, and it is behaving just as
>>    expected of a well-behaved model
>>    - This problem is only appearing when I use a Postgres database. When
>>    I use a sqlite, the behaviour does not happen
>>
>> All of this is leading me to the conclusion that something is wrong with
>> the tables for the three models that use Displayable, or that there's
>> something wrong in the way that Displayable's manager access them.
>>
>>
>> Any tips would be greatly appreciated.
>>
>>
>> /majd
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/mezzanine-users/o6I7Rughqa8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to