Skip to content

Commit

Permalink
[#1656] add doc string about defer_commit to get_site_user
Browse files Browse the repository at this point in the history
  • Loading branch information
joetsoi committed Apr 22, 2014
1 parent f31a192 commit 7f0e59e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ckan/logic/action/get.py
Expand Up @@ -2036,6 +2036,16 @@ def term_translation_show(context, data_dict):

# Only internal services are allowed to call get_site_user.
def get_site_user(context, data_dict):
'''Return the ckan site user
:param defer_commit: by default (or if set to false) get_site_user will
commit and clean up the current transaction, it will also close and
discard the current session in the context. If set to true, caller
is responsible for commiting transaction after get_site_user is
called. Leaving open connections can cause cli commands to hang!
(optional, default: False)
:type defer_commit: boolean
'''
_check_access('get_site_user', context, data_dict)
model = context['model']
site_id = config.get('ckan.site_id', 'ckan_site_user')
Expand Down

0 comments on commit 7f0e59e

Please sign in to comment.