From 0e40735931da182fba43961d1c8a289424272cfa Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Wed, 17 Feb 2016 21:11:36 +0100 Subject: [PATCH] Fix motions and users csv import. --- openslides/motions/static/js/motions/site.js | 8 ++++---- openslides/users/static/js/users/site.js | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index 8ff72335b..52ec79b43 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -919,8 +919,8 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions']) $scope.csvImporting = true; angular.forEach($scope.motions, function (motion) { if (!motion.importerror) { - // create new user if not exist - if (!motion.submitters_id) { + // create new user if not exists + if (!motion.submitters_id && motion.submitter) { var index = motion.submitter.indexOf(' '); var user = { first_name: motion.submitter.substr(0, index), @@ -934,8 +934,8 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions']) } ); } - // create new category if not exist - if (!motion.category_id) { + // create new category if not exists + if (!motion.category_id && motion.category) { var category = { name: motion.category, prefix: motion.category.charAt(0) diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index 016231e45..62448e8b8 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -721,6 +721,8 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) } else { user.is_active = false; } + } else { + user.is_active = false; } $scope.users.push(user); });