Possibly a bug in graphene
See original GitHub issueI spent hours on this and no luck it looks like a bug. All fields show up in the results of my query but the “type” and there is no difference between the “type” and the “issuer” for example, both are foriegn keys. Graphene randomly removes the type while it is there and when I print it in the resolver i see it has a value. Any thought?
` class T(models.Model): type=models.CharField(default=“type 1”,null=False,blank=False,max_length=40) def str(self): return self.type
class Post(models.Model): slug=models.SlugField(unique=True) issuer=models.ForeignKey(User,on_delete=models.SET_NULL,blank=False,null=True,related_name=“posts”) date_created=models.DateTimeField(default=timezone.now) last_edited=models.DateTimeField(null=True) num_interests = models.IntegerField(verbose_name=“Number of interests so far”,default=0) status=models.CharField(max_length=30,default=“posted”) tags=TaggableManager() title=models.CharField (max_length=200,blank=False) description =models.TextField(max_length=settings.MAX_TEXTAREA_LEN,default=“”, validators=[MaxLengthValidatorFactory(settings.MAX_TEXTAREA_LEN)],blank=False) goodUntil = models.DateField(verbose_name=_(“Date”),default=datetime.now()+timedelta(days=7)) subjects=models.ManyToManyField(to=Subject,related_name=‘posts’,blank=False) type=models.ForeignKey(T,on_delete=models.SET_NULL,blank=False,null=True,related_name=“type”)`
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
it’s very unfortunate that your buggy program wasted so much of my time and without any reason or any error, it works erroneously.
It seems this issue is now solved. Closing