support user not found for a name.
This commit is contained in:
@@ -507,6 +507,14 @@ def expenses(request):
|
||||
if dic_out[tab_path[4]].get('RIB') is None:
|
||||
dic_out[tab_path[4]]['RIB'] = {'files':[], 'thumb':[]}
|
||||
u = User.by_slug(tab_path[4])
|
||||
if u is None:
|
||||
dic_out[tab_path[4]]['User'] = {
|
||||
'uid':'# NOT FOUND',
|
||||
'nom':name,
|
||||
'prenom':'# NOT FOUND',
|
||||
'slug':'# NOT FOUND'
|
||||
}
|
||||
else:
|
||||
dic_out[tab_path[4]]['User'] = {
|
||||
'uid':u.uid,
|
||||
'nom':u.nom,
|
||||
@@ -525,6 +533,14 @@ def expenses(request):
|
||||
if dic_out[tab_path[4]].get('Justif') is None:
|
||||
dic_out[tab_path[4]]['Justif'] = {'files':[], 'thumb':[]}
|
||||
u = User.by_slug(tab_path[4])
|
||||
if u is None:
|
||||
dic_out[tab_path[4]]['User'] = {
|
||||
'uid':'# NOT FOUND',
|
||||
'nom':name,
|
||||
'prenom':'# NOT FOUND',
|
||||
'slug':'# NOT FOUND'
|
||||
}
|
||||
else:
|
||||
dic_out[tab_path[4]]['User'] = {
|
||||
'uid':u.uid,
|
||||
'nom':u.nom,
|
||||
|
||||
Reference in New Issue
Block a user