-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [#326] -- correctly handle currency/Decimal types
- Loading branch information
1 parent
221bf56
commit 67df43a
Showing
4 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
from decimal import Decimal | ||
|
||
from django.apps import AppConfig | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from django_camunda.utils import TYPE_MAP as CAMUNDA_TYPE_MAP | ||
|
||
|
||
class CamundaApp(AppConfig): | ||
name = "openforms.registrations.contrib.camunda" | ||
label = "registrations_camunda" | ||
verbose_name = _("Camunda registration plugin") | ||
|
||
def ready(self): | ||
patch_django_camunda() | ||
|
||
# register plugin | ||
from . import plugin # noqa | ||
|
||
|
||
def patch_django_camunda(): | ||
CAMUNDA_TYPE_MAP[Decimal] = ("Double", lambda val: str(val)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters