Skip to content

small patch for managers.py#1

Open
SkiBY wants to merge 1 commit intomasterfrom
SkiBY-patch-1
Open

small patch for managers.py#1
SkiBY wants to merge 1 commit intomasterfrom
SkiBY-patch-1

Conversation

@SkiBY
Copy link
Copy Markdown
Owner

@SkiBY SkiBY commented Sep 28, 2017

Django 1.11.
Without name field in init we have an error: '_TaggableManager' object has no attribute 'name'

class C(models.Model):
...
tags = TaggableManager()
...

def get_fields_with_value(self):
    return ((f, getattr(self, f, None)) for f in self.get_fields())

Django 1.11.
Without name field in init we have an error: '_TaggableManager' object has no attribute 'name' 

class C(models.Model):
    ...
    tags = TaggableManager()
    ...

    def get_fields_with_value(self):
        return ((f, getattr(self, f, None)) for f in self.get_fields())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant