[Freeipa-devel] [PATCH] 0036 Fix displaying of success message
Petr Vobornik
pvoborni at redhat.com
Thu Jun 13 15:18:46 UTC 2013
On 06/13/2013 04:16 PM, Ana Krivokapic wrote:
> Hello,
>
> Make sure that the success message in web UI is properly populated with actual
> number of items that were successfully added/removed.
>
> https://fedorahosted.org/freeipa/ticket/3708
>
The changes look good. But I've found an existing issue in the code
which was moved to get_succeeded:
When no operation succeeds following code behaves incorrectly:
+ var succeeded = data.result.completed;
+
+ if (!succeeded) {
The condition is evaluated as true when data.result.completed === 0.
It's not desired because the subsequent commands in the if block will
raise JS error (data.result doesn't have results obj).
So we should check for:
if (typeof succeeded !== 'number')
--
Petr Vobornik
More information about the Freeipa-devel
mailing list