Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
Move AmendementSaisi event to Visam models
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnix committed Apr 9, 2020
1 parent 3d6e73b commit dcf8def
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
16 changes: 0 additions & 16 deletions repondeur/zam_repondeur/models/events/amendement.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,6 @@ def render_details(self) -> str:
)


class AmendementSaisi(AmendementEvent):
__mapper_args__ = {"polymorphic_identity": "amendement_saisi"}

icon = "edit"

summary_template = Template(
f"L’amendement a été saisi par <abbr title='$email'>$user</abbr>."
)

def apply(self) -> None:
pass

def render_details(self) -> str:
return ""


class AmendementRectifie(AmendementEvent):
__mapper_args__ = {"polymorphic_identity": "amendement_rectifie"}

Expand Down
1 change: 1 addition & 0 deletions repondeur/zam_repondeur/visam/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .conseil import Conseil, Formation # noqa
from .events import AmendementSaisi # noqa
19 changes: 19 additions & 0 deletions repondeur/zam_repondeur/visam/models/events.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from string import Template

from zam_repondeur.models.events.amendement import AmendementEvent


class AmendementSaisi(AmendementEvent):
__mapper_args__ = {"polymorphic_identity": "amendement_saisi"}

icon = "edit"

summary_template = Template(
f"L’amendement a été saisi par <abbr title='$email'>$user</abbr>."
)

def apply(self) -> None:
pass

def render_details(self) -> str:
return ""
2 changes: 1 addition & 1 deletion repondeur/zam_repondeur/visam/views/amendements_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from zam_repondeur.message import Message
from zam_repondeur.models import Amendement, Article, DBSession
from zam_repondeur.models.division import SubDiv
from zam_repondeur.models.events.amendement import AmendementSaisi
from zam_repondeur.resources import AmendementCollection
from zam_repondeur.services.clean import clean_html
from zam_repondeur.visam.models import AmendementSaisi

GROUPES = {
"LE GOUVERNEMENT": "Gouvernement",
Expand Down

0 comments on commit dcf8def

Please sign in to comment.