@@ -224,18 +224,19 @@ def message_user(self, request, message, *args, **kwargs):
224
224
concurrency_errros = len (conflicts )
225
225
if m :
226
226
updated_record = int (m .group ('num' )) - concurrency_errros
227
- if updated_record == 0 :
228
- message = _ ("No %(name)s were changed due conflict errors" ) % {'name' : names [0 ]}
227
+
228
+ ids = "," .join (map (str , conflicts ))
229
+ messages .error (request ,
230
+ ungettext ("Record with pk `{0}` has been modified and was not updated" ,
231
+ "Records `{0}` have been modified and were not updated" ,
232
+ concurrency_errros ).format (ids ))
233
+ if updated_record == 1 :
234
+ name = force_text (opts .verbose_name )
229
235
else :
230
- ids = "," .join (map (str , conflicts ))
231
- messages .error (request ,
232
- ungettext ("Record with pk `{0}` has been modified and was not updated" ,
233
- "Records `{0}` have been modified and were not updated" ,
234
- concurrency_errros ).format (ids ))
235
- if updated_record == 1 :
236
- name = force_text (opts .verbose_name )
237
- else :
238
- name = force_text (opts .verbose_name_plural )
236
+ name = force_text (opts .verbose_name_plural )
237
+
238
+ message = None
239
+ if updated_record > 0 :
239
240
message = ungettext ("%(count)s %(name)s was changed successfully." ,
240
241
"%(count)s %(name)s were changed successfully." ,
241
242
updated_record ) % {'count' : updated_record ,
0 commit comments