Skip to content

count() issue when using instance_of() #134

Closed
@Karmak23

Description

@Karmak23

Hi, I hit this strange behaviour:

In [22]: k.feeds.instance_of(MailFeed)
Out[22]: [<MailFeed: MailFeed “Tweets envoyés via mail” of user karmak23 (#6667)>]

In [23]: k.feeds.instance_of(MailFeed).count()
Out[23]: 0

In [24]: len(k.feeds.instance_of(MailFeed))
Out[24]: 1

MailFeed is a child of BaseFeed. Obviously, count() should return 1.

The strangest thing is that it doesn't happen with another child class of the same level (RssAtomFeed, to name it) :

In [25]: k.feeds.instance_of(RssAtomFeed).count()
Out[25]: 233

In [26]: len(k.feeds.instance_of(RssAtomFeed))       
Out[26]: 233

Where should I head to find if the issue comes from my code or polymorphic ? Do you have any hint of what could cause this strange behavior ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions