I've currently got a model:
class Ticket(db.Document):
name = db.StringField #issue.key
project = db.StringField() #issue.fields.project.key
issue_type = db.StringField() #issue.fields.issuetype.name
summary = db.StringField() #issue.fields.summary
description = db.StringField() #issue.fields.description
created = db.DateTimeField() #issue.fields.created
updated = db.DateTimeField() #issue.fields.updated
And some code that attempts to upsert:
Ticket.objects(name=name).update(
upsert = True,
name = name,
project = project,
issue_type = issue_type,
summary = summary,
description = description,
created = created,
updated = updated
)
And I'm getting this error message:
mongoengine.errors.InvalidQueryError: Cannot resolve field "name"
With the relevant bit saying the error occurs in
updated = updated
So far I've tried re-naming the fields of my variables and my model, but the error message remains the same. Sorry for asking if there's an in my face answer I'm blind to.
Update: If I delete name = name from the update it works fine. I renamed name to title and re-added it and it does not work. I am thoroughly confused.