|
@@ -145,15 +145,22 @@ def admin_create(request):
|
145
|
145
|
# both are hidden in the form, to identify the object here
|
146
|
146
|
if in_put != 'classname' and in_value != '':
|
147
|
147
|
dhl = target_leo.data_handler(in_put[12:])
|
148
|
|
- if dhl.is_reference() and in_value != '':
|
149
|
|
- logger.warning("Provisoire pour faire les tests, à fixer")
|
|
148
|
+ if dhl.is_singlereference():
|
|
149
|
+ in_value=int(in_value)
|
|
150
|
+ elif dhl.is_reference() and in_value != '':
|
|
151
|
+ logger.info(in_value)
|
150
|
152
|
in_value.replace(" ","")
|
151
|
153
|
in_value=in_value.split(',')
|
|
154
|
+ in_value=list(in_value)
|
|
155
|
+ l=list()
|
152
|
156
|
for i in in_value:
|
153
|
157
|
l.append(int(i))
|
154
|
|
- in_value=list(l)
|
|
158
|
+ in_value=l
|
|
159
|
+
|
155
|
160
|
fields[in_put[12:]] = in_value
|
156
|
|
-
|
|
161
|
+ if in_value == '':
|
|
162
|
+ fields[in_put[12:]] = None
|
|
163
|
+
|
157
|
164
|
# Insertion in the database of the values corresponding to a new object
|
158
|
165
|
new_uid = target_leo.insert(fields)
|
159
|
166
|
|