summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
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
commit656ac8677952018fb58dc87c68f5509ba58208d9 (patch)
tree60fb8dbf5cd76ab46ccfdf975b216999c6d3315d /archaeological_context_records/models.py
parente886e8a1a79880bed9cd0ec480a0658ae93ad400 (diff)
downloadIshtar-656ac8677952018fb58dc87c68f5509ba58208d9.tar.bz2
Ishtar-656ac8677952018fb58dc87c68f5509ba58208d9.zip
Django 1.8: remove transaction.commit_unless_managed
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py6
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)