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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 5 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy