I have two models in Django 1.8.8:
class Company(models.Model):
name = models.CharField(max_length=200)
members = models.ManyToManyField(User)
class Folder(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(null=True, blank=True)
company = models.ForeignKey(Company, null=True, blank=True)
parent = models.ForeignKey("Folder", null=True, blank=True)
and when I'm doing in template
{% for user in current_folder.company.members.all %}
I sometimes (randomly after a few page's reload) get very strange error:
FieldDoesNotExist: Company_members has no field named None
I also use sqlite3 database. Anyone have idea where is a problem?
This is most probbly the related django ticket you should check https://code.djangoproject.com/ticket/24513
And this issue could be somehow related though not 100% https://github.com/jet-admin/jet-django/issues/7
You might get some insight reading the threads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With