diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-19 10:21:37 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-19 10:21:37 +0200 |
| commit | 016c49d7a9b149720c75501525f79f19a73ff3b3 (patch) | |
| tree | 60fb8dbf5cd76ab46ccfdf975b216999c6d3315d /archaeological_context_records/models.py | |
| parent | 270d2a3735ec65b58bdb23678aaede1b0ff90b7d (diff) | |
| download | Ishtar-016c49d7a9b149720c75501525f79f19a73ff3b3.tar.bz2 Ishtar-016c49d7a9b149720c75501525f79f19a73ff3b3.zip | |
Django 1.8: remove transaction.commit_unless_managed
Diffstat (limited to 'archaeological_context_records/models.py')
| -rw-r--r-- | archaeological_context_records/models.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 0a5ab7cbc..64859c185 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -346,10 +346,8 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, """.format(main_ope_prefix=settings.ISHTAR_OPE_PREFIX, ope_prefix=settings.ISHTAR_DEF_OPE_PREFIX, join=settings.JOINT, where=where) - # with connection.cursor() as c: # django 1.8 - c = connection.cursor() - c.execute(sql, args) - transaction.commit_unless_managed() + with connection.cursor() as c: + c.execute(sql, args) cls._meta.get_field_by_name( 'base_finds')[0].model.cached_label_bulk_update(**kwargs) |
