I'm trying to create an instance of this Report model:
class Report(models.Model):
"""
A model for storing credit reports pulled from Equifax.
"""
user = models.ForeignKey(to=CustomUserModel, on_delete=models.CASCADE,
help_text='User report belongs to.')
timestamp = models.DateTimeField(default=timezone.now)
report = JSONField()
However, whenever I try I get this error:
Exception Type: TypeError at /internal/report
Exception Value: 'report' is an invalid keyword argument for this function
This happens whether I instantiate the instance using the Report().save()
method, or the Report.object.create()
method as follows:
report_obj = Report.objects.create(
user=user,
report=report
)
Does anyone have any clue what's going on? There is very clearly a "report" attribute for that class, so why the error?
Thanks!