Merge pull request #1986 from emanuelschuetze/fixCSVimport
Fix motions and users csv import.
This commit is contained in:
commit
41d9706a35
@ -919,8 +919,8 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
|||||||
$scope.csvImporting = true;
|
$scope.csvImporting = true;
|
||||||
angular.forEach($scope.motions, function (motion) {
|
angular.forEach($scope.motions, function (motion) {
|
||||||
if (!motion.importerror) {
|
if (!motion.importerror) {
|
||||||
// create new user if not exist
|
// create new user if not exists
|
||||||
if (!motion.submitters_id) {
|
if (!motion.submitters_id && motion.submitter) {
|
||||||
var index = motion.submitter.indexOf(' ');
|
var index = motion.submitter.indexOf(' ');
|
||||||
var user = {
|
var user = {
|
||||||
first_name: motion.submitter.substr(0, index),
|
first_name: motion.submitter.substr(0, index),
|
||||||
@ -934,8 +934,8 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// create new category if not exist
|
// create new category if not exists
|
||||||
if (!motion.category_id) {
|
if (!motion.category_id && motion.category) {
|
||||||
var category = {
|
var category = {
|
||||||
name: motion.category,
|
name: motion.category,
|
||||||
prefix: motion.category.charAt(0)
|
prefix: motion.category.charAt(0)
|
||||||
|
@ -721,6 +721,8 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
|||||||
} else {
|
} else {
|
||||||
user.is_active = false;
|
user.is_active = false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
user.is_active = false;
|
||||||
}
|
}
|
||||||
$scope.users.push(user);
|
$scope.users.push(user);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user