Guénaël Muller 6 лет назад
Родитель
Сommit
5b499a58d1
1 измененных файлов: 4 добавлений и 2 удалений
  1. 4 2
      tracim/models/__init__.py

+ 4 - 2
tracim/models/__init__.py Просмотреть файл

@@ -51,11 +51,13 @@ def get_tm_session(session_factory, transaction_manager):
51 51
     # FIXME - G.M - 02-05-2018 - Check Zope/Sqlalchemy session conf.
52 52
     # We use both keep_session=True for zope and
53 53
     # expire_on_commit=False for sessionmaker to keep session alive after
54
-    # commit ( in order  to not have trouble like #52 or
55
-    # detached objects problems).
54
+    # commit ( in order  to not have trouble like
55
+    # https://github.com/tracim/tracim_backend/issues/52
56
+    # or detached objects problems).
56 57
     # These problem happened because we use "commit" in our current code.
57 58
     # Understand what those params really mean and check if it can cause
58 59
     # troubles somewhere else.
60
+    # see https://stackoverflow.com/questions/16152241/how-to-get-a-sqlalchemy-session-managed-by-zope-transaction-that-has-the-same-sc  # nopep8
59 61
     zope.sqlalchemy.register(
60 62
         dbsession,
61 63
         transaction_manager=transaction_manager,