Move motion exceptions to its own file in the motion app.
This commit is contained in:
parent
2e37e4c18b
commit
8363b06fc1
23
openslides/motion/exceptions.py
Normal file
23
openslides/motion/exceptions.py
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
openslides.motion.exceptions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Exceptions for the motion app.
|
||||
|
||||
:copyright: (c) 2011-2013 by the OpenSlides team, see AUTHORS.
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from openslides.utils.exceptions import OpenSlidesError
|
||||
|
||||
|
||||
class MotionError(OpenSlidesError):
|
||||
"""Exception raised when errors in the motion accure."""
|
||||
pass
|
||||
|
||||
|
||||
class WorkflowError(OpenSlidesError):
|
||||
"""Exception raised when errors in a workflow or state accure."""
|
||||
pass
|
@ -24,7 +24,6 @@ from django.utils.translation import ugettext_lazy, ugettext_noop, ugettext as _
|
||||
|
||||
from openslides.utils.utils import _propper_unicode
|
||||
from openslides.utils.person import PersonField
|
||||
from openslides.utils.exceptions import OpenSlidesError
|
||||
from openslides.config.models import config
|
||||
from openslides.config.signals import default_config_value
|
||||
from openslides.poll.models import (
|
||||
@ -34,11 +33,7 @@ from openslides.projector.api import register_slidemodel
|
||||
from openslides.projector.models import SlideMixin
|
||||
from openslides.agenda.models import Item
|
||||
|
||||
|
||||
class MotionError(OpenSlidesError):
|
||||
"""Exception raised when errors in the motion accure."""
|
||||
pass
|
||||
|
||||
from .exceptions import MotionError, WorkflowError
|
||||
|
||||
class Motion(SlideMixin, models.Model):
|
||||
"""The Motion Class.
|
||||
@ -629,11 +624,6 @@ class MotionPoll(CountInvalid, CountVotesCast, BasePoll):
|
||||
CountVotesCast.append_pollform_fields(self, fields)
|
||||
|
||||
|
||||
class WorkflowError(OpenSlidesError):
|
||||
"""Exception raised when errors in a workflow or state accure."""
|
||||
pass
|
||||
|
||||
|
||||
class State(models.Model):
|
||||
"""Defines a state for a motion.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user