Skip to content

Commit 39a1c38

Browse files
committed
in _get_info handle i is None situation; add apijson depend apps
1 parent f3e308d commit 39a1c38

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

uliweb_apijson/apijson/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def _get_array_q(self,params):
174174
return q
175175

176176
def _get_info(self,i,as_dict_child=False):
177-
177+
if (not i):
178+
return {}
178179
d = i.to_dict()
179180
if self.secret_fields:
180181
for k in self.secret_fields:

uliweb_apijson/apijson/config.ini

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[DEPENDS]
2+
REQUIRED_APPS = [
3+
'uliweb.contrib.auth',
4+
'uliweb.contrib.rbac',
5+
]

0 commit comments

Comments
 (0)