Do not migrate log without trigger
The notification and resource columns are required so they can not be updated with NULL value when there is no trigger linked. issue10622 review369341002
This commit is contained in:
1 parent
452d37f23f
commit
c0fecc8139
1 file changed
+3
-1
+3
-1
@@ -8,6 +8,7 @@ from email.mime.multipart import MIMEMultipart
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.utils import getaddresses
|
||||
|
||||
from sql import Null
|
||||
from sql.operators import Concat
|
||||
from genshi.template import TextTemplate
|
||||
|
||||
@@ -399,7 +400,8 @@ class EmailLog(ResourceAccessMixin, ModelSQL, ModelView):
|
||||
where=trigger.id == table.trigger))
|
||||
cursor.execute(*table.update(
|
||||
[table.notification, table.resource],
|
||||
[notification, resource]))
|
||||
[notification, resource],
|
||||
where=table.trigger != Null))
|
||||
table_h.not_null_action('trigger', 'remove')
|
||||
|
||||
def get_date(self, name):
|
||||
|
||||
Reference in new issue
Block a user