Skip to content

Commit

Permalink
fix draft election failed creation (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
edulix authored Mar 9, 2018
1 parent 93573ee commit d0fb476
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions avAdmin/draft-election.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ angular.module('avAdmin')
var deferred = $q.defer();
if (_.isFunction(update_func)) {
if (!_.isUndefined(election) &&
"{}" !== JSON.stringify(election)) {
"{}" !== JSON.stringify(election))
{
if (election.id) {
delete election.id;
}
update_func(election);
}
}

Authmethod.getUserDraft()
.success(function (data) {
election = data;
Expand Down

0 comments on commit d0fb476

Please sign in to comment.