Skip to content

Commit

Permalink
Neuer Fall, wenn Partei nichts eingetragen hat.
Browse files Browse the repository at this point in the history
  • Loading branch information
redsolver committed Sep 28, 2019
1 parent bc176f0 commit 95c715f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/models/quiz_question.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class QuizQuestion {
source = json['source'];
context = json['context'];
statement = json['statement'];
possibleParties = json['possibleParties'];
possibleParties = json['possibleParties'].cast<String>();
}

Map<String, dynamic> toJson() {
Expand Down
5 changes: 4 additions & 1 deletion lib/parteiduell_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ execute(HttpRequest request) async {

for (String s in toReplace) {
statement = statement.replaceAll(
RegExp('' + s + '\s', caseSensitive: false), '█████');
RegExp('' + s + '', caseSensitive: false), '█████');
}
if (statement.trim().length == 0)
statement =
'Diese Partei hat keine Erklärung zu dieser These abgegeben.';

question.possibleAnswers[key] = statement;
}
Expand Down

0 comments on commit 95c715f

Please sign in to comment.