Skip to content

Commit

Permalink
Fix user not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
frafra authored and tino097 committed Dec 10, 2018
1 parent efcdf4c commit 2d1cf4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/lib/helpers.py
Expand Up @@ -48,7 +48,7 @@
import ckan.plugins as p
import ckan

from ckan.common import _, ungettext, c, request, session, json
from ckan.common import _, ungettext, c, g, request, session, json
from markupsafe import Markup, escape


Expand Down Expand Up @@ -1133,10 +1133,10 @@ def sorted_extras(package_extras, auto_clean=False, subs=None, exclude=None):

@core_helper
def check_access(action, data_dict=None):
if not getattr(c, u'user', None):
c.user = None
if not getattr(g, u'user', None):
g.user = ''
context = {'model': model,
'user': c.user}
'user': g.user}
if not data_dict:
data_dict = {}
try:
Expand Down

0 comments on commit 2d1cf4d

Please sign in to comment.