Explorar el Código

support user not found for a name.

master
philippe lhardy hace 7 años
padre
commit
f87767d25e
Se han modificado 1 ficheros con 28 adiciones y 12 borrados
  1. +28
    -12
      jm2l/views.py

+ 28
- 12
jm2l/views.py Ver fichero

@@ -507,12 +507,20 @@ 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])
dic_out[tab_path[4]]['User'] = {
'uid':u.uid,
'nom':u.nom,
'prenom':u.prenom,
'slug':u.slug
}
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,
'prenom':u.prenom,
'slug':u.slug
}
dic_out[tab_path[4]]['RIB']['files'].append( name )
dic_out[tab_path[4]]['RIB']['thumb'].append( name + ".jpg" )

@@ -525,12 +533,20 @@ 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])
dic_out[tab_path[4]]['User'] = {
'uid':u.uid,
'nom':u.nom,
'prenom':u.prenom,
'slug':u.slug
}
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,
'prenom':u.prenom,
'slug':u.slug
}
dic_out[tab_path[4]]['Justif']['files'].append( name )
dic_out[tab_path[4]]['Justif']['thumb'].append( name + ".jpg" )



Cargando…
Cancelar
Guardar