From 21cfc3f465f18a030878032477ec255421a2e8dc Mon Sep 17 00:00:00 2001 From: Nikhil Komawar Date: Thu, 5 Dec 2013 13:57:05 -0500 Subject: [PATCH] Makes tasks owner not nullable in models.py The tasks table scheme in migration for adding tasks to Glance DB has a flag for disabling from setting a NULL owner. In order to keep the behavior consistent across the glance codebase, this patch adds owner as not nullable in the models.py. Fixes bug: 1257949 Change-Id: Id9fff4277f427b7d83d80b5a0a8029968f70e0df --- glance/db/sqlalchemy/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glance/db/sqlalchemy/models.py b/glance/db/sqlalchemy/models.py index c0d1b463d8..c9c9c4c04b 100644 --- a/glance/db/sqlalchemy/models.py +++ b/glance/db/sqlalchemy/models.py @@ -219,7 +219,7 @@ class Task(BASE, GlanceBase): id = Column(String(36), primary_key=True, default=uuidutils.generate_uuid) type = Column(String(30)) status = Column(String(30)) - owner = Column(String(255)) + owner = Column(String(255), nullable=False) expires_at = Column(DateTime, nullable=True)