make job.created_by nullable

Since letter jobs from the API aren't created by any single individual,
lets make created_by nullable. Note: We'll have to make sure that we
update the admin app to handle these jobs nicely
This commit is contained in:
Leo Hemsted
2017-07-27 12:58:13 +01:00
parent 11458c421b
commit f528236eda
4 changed files with 27 additions and 7 deletions

View File

@@ -654,7 +654,7 @@ class Job(db.Model):
unique=False,
nullable=True)
created_by = db.relationship('User')
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=False)
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=True)
scheduled_for = db.Column(
db.DateTime,
index=True,