Repair the master

This commit is contained in:
FinnStutzenstein 2018-01-23 08:49:13 +01:00
parent 172581d557
commit 60b6ef1415
5 changed files with 38 additions and 13 deletions

View File

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-01-23 08:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20170412_1258'),
]
operations = [
migrations.AlterField(
model_name='projector',
name='height',
field=models.PositiveIntegerField(default=768),
),
migrations.AlterField(
model_name='projector',
name='width',
field=models.PositiveIntegerField(default=1024),
),
]

View File

@ -9,6 +9,7 @@ angular.module('OpenSlidesApp.core', [
'ngAnimate', 'ngAnimate',
'ngBootbox', 'ngBootbox',
'ngSanitize', // TODO: only use this in functions that need it. 'ngSanitize', // TODO: only use this in functions that need it.
'ngStorage',
'ui.bootstrap', 'ui.bootstrap',
'ui.bootstrap.datetimepicker', 'ui.bootstrap.datetimepicker',
'ui.tree', 'ui.tree',
@ -43,6 +44,13 @@ angular.module('OpenSlidesApp.core', [
} }
]) ])
.config([
'$sessionStorageProvider',
function ($sessionStorageProvider) {
$sessionStorageProvider.setKeyPrefix('OpenSlides');
}
])
.factory('autoupdate', [ .factory('autoupdate', [
'DS', 'DS',
'REALM', 'REALM',

View File

@ -16,7 +16,6 @@ angular.module('OpenSlidesApp.core.site', [
'ngDialog', 'ngDialog',
'ngFileSaver', 'ngFileSaver',
'ngMessages', 'ngMessages',
'ngStorage',
'ckeditor', 'ckeditor',
'luegg.directives', 'luegg.directives',
'xeditable', 'xeditable',
@ -416,13 +415,6 @@ angular.module('OpenSlidesApp.core.site', [
} }
]) ])
.config([
'$sessionStorageProvider',
function ($sessionStorageProvider) {
$sessionStorageProvider.setKeyPrefix('OpenSlides');
}
])
.factory('ProjectorMessageForm', [ .factory('ProjectorMessageForm', [
'Editor', 'Editor',
'gettextCatalog', 'gettextCatalog',

View File

@ -404,7 +404,7 @@ class MotionViewSet(ModelViewSet):
if extension is not None: if extension is not None:
# Find the special "state" comment field. # Find the special "state" comment field.
for id, field in config['motions_comments'].items(): for id, field in config['motions_comments'].items():
if 'forState' in field and field['forState'] is True: if isinstance(field, dict) and 'forState' in field and field['forState'] is True:
motion.comments[id] = extension motion.comments[id] = extension
break break

View File

@ -64,11 +64,11 @@ class TemplateView(View):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
if self.template_name is None: if self.template_name is None:
raise ImproperlyConfigured("'template_name' is not provided") raise ImproperlyConfigured("'template_name' is not provided.")
if 'template' not in self.state: if self.template_name not in self.state:
with open(finders.find(self.template_name)) as template: with open(finders.find(self.template_name)) as template:
self.state['template'] = template.read() self.state[self.template_name] = template.read()
def get(self, *args: Any, **kwargs: Any) -> HttpResponse: def get(self, *args: Any, **kwargs: Any) -> HttpResponse:
return HttpResponse(self.state['template']) return HttpResponse(self.state[self.template_name])