Skip to content
Open
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
6f7605c
45773 feat(fieldsets) backend init commit
pneumojoseph Apr 23, 2026
975d3ee
45773 feat(fieldsets): frontend init commit
pneumojoseph Apr 23, 2026
f67dee1
Merge remote-tracking branch 'origin/frontend/fieldsets/45773__fields…
Maria-Lordwill Apr 24, 2026
c0ab52f
46129 fix(fieldset): fieldsets link visibility for unsaved templates …
Maria-Lordwill Apr 24, 2026
c563064
46129 fix(fieldsets): fix task output fields width narrower than desc…
Maria-Lordwill Apr 27, 2026
21797ab
45773 feat(fieldsets): add ordering parameter to the GET /templates/i…
pneumojoseph Apr 27, 2026
5496bf6
45773 feat(fieldsets): remove "order" field from fieldsets api
pneumojoseph Apr 27, 2026
87dd575
46129 feat(fieldsets): add breadcrumb navigation on fieldset detail page
Maria-Lordwill Apr 28, 2026
aefb0b2
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
Maria-Lordwill Apr 28, 2026
dfae482
46129 feat(fieldsets) add sorting SelectMenu to fieldsets list page
Maria-Lordwill Apr 28, 2026
03e6896
45773 feat(fieldsets): add an m2m relation betweet TaskTemplate, Kick…
pneumojoseph Apr 28, 2026
589f685
45773 feat(fieldsets): Passing the FieldSet.order property from the i…
pneumojoseph Apr 28, 2026
b81d55a
45773 feat(fieldsets): allow adding one same fieldset to different te…
pneumojoseph Apr 29, 2026
1d70614
resolve conflicts and merge master into 46129
Maria-Lordwill Apr 29, 2026
5b6c82a
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
Maria-Lordwill Apr 29, 2026
5944362
46129 feat(fieldsets)!: migrate fieldset identification to apiName in…
Maria-Lordwill Apr 30, 2026
e93cdc1
46129 feat(fieldsets): display fields and fieldsets in unified order-…
Maria-Lordwill Apr 30, 2026
f05fee2
46129 fix(fieldsets): fix output display order in workflow log, task …
Maria-Lordwill Apr 30, 2026
4a1332e
46129 fix(datasets): pass datasetOptions to ExtraFieldIntl in OutputF…
Maria-Lordwill May 1, 2026
da96ea3
46129 chore(fieldsets): remove stray word left from refactoring
Maria-Lordwill May 2, 2026
9ac5c6c
45773 fix(templates): correct removing fieldset from task and kickoff
pneumojoseph May 4, 2026
0fed34e
Merge branch 'master' of github.com:pneumaticapp/pneumaticworkflow in…
pneumojoseph May 4, 2026
060065e
45773 fix(migrtions): rename migrations
pneumojoseph May 5, 2026
fe91aff
46129 resolve conflicts and merge 45773 into 46129
Maria-Lordwill May 5, 2026
bfee87f
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
Maria-Lordwill May 5, 2026
c03df84
46129 fix(tests): add missing property in TaskPerformers test
Maria-Lordwill May 5, 2026
aaec178
Merge branch 'master' of github.com:pneumaticapp/pneumaticworkflow in…
Maria-Lordwill May 5, 2026
2cc2b38
45773 fix(workflows): skip deleted fieldsets when workflow creates
pneumojoseph May 5, 2026
595d5fa
yamaha fix(editor): include fieldset fields in cleanTemplateReference…
Maria-Lordwill Apr 30, 2026
2813859
yamaha fix(fildsets): clean up stale fieldset references in cleanTemp…
Maria-Lordwill May 1, 2026
a3dd2f7
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
Maria-Lordwill May 5, 2026
2d39393
46129 fix(fieldsets): include fieldsets in output guard check for wor…
Maria-Lordwill May 5, 2026
4b52f1b
46129 refactor(fieldsets): migrate fieldset catalog from React Contex…
Maria-Lordwill May 6, 2026
b868db2
46129 refactor(fieldsets): centralize fieldset catalog in Redux, skip…
Maria-Lordwill May 6, 2026
cd8ef70
45773 feat(templates): add fieldsets to GET /templates/id/fieldsets
pneumojoseph May 6, 2026
a5f79a5
46129 refactor(fieldset): unify Kickoff and Task fieldset rendering v…
Maria-Lordwill May 6, 2026
0f6f6c5
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
Maria-Lordwill May 6, 2026
4fa0dec
45773 fix(templates): add fieldset order to the GET /templates API
pneumojoseph May 6, 2026
92b3c1f
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
pneumojoseph May 6, 2026
4e44624
45773 fix(templates): add fieldset to the GET /templates/public
pneumojoseph May 6, 2026
ac887b8
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
pneumojoseph May 6, 2026
0d89fea
46129 fix(datasets): enforce strict datasetOptions typing in ExtraFie…
Maria-Lordwill May 7, 2026
2eb16d6
46129 fix(fieldsets): use kickoff fieldset order in Run form instead …
Maria-Lordwill May 7, 2026
e17e818
46129 fix(fieldsets): correct field/fieldset ordering in KickoffEdit,…
Maria-Lordwill May 8, 2026
e02b465
test(fieldsets): add tests for correct fields and fieldsets ordering …
Maria-Lordwill May 8, 2026
fcf7b98
45773 feat(fieldsets): not raise "sum_equal" exception for a blank an…
pneumojoseph May 8, 2026
6c93f44
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
pneumojoseph May 8, 2026
a7ecb1d
46129 fix(fieldsets): clear fieldsets list on template switch to prev…
Maria-Lordwill May 8, 2026
4dcf8d0
Merge branch 'frontend/templates/46129__add_fieldsets' of github.com:…
Maria-Lordwill May 8, 2026
f30f832
Merge branch 'master' of github.com:pneumaticapp/pneumaticworkflow in…
Maria-Lordwill May 8, 2026
1a7c0f3
45773 feat(workflow): GET /workflows?fields api now returns fieldset …
pneumojoseph May 8, 2026
d528e16
45773 feat(workflow): GET /workflows/fields api now returns fieldset …
pneumojoseph May 8, 2026
59fe705
46129 fix(fieldsets): persist fieldsets in localStorage via storage f…
Maria-Lordwill May 11, 2026
62011cd
46129 feat(notifications): add complete_workflow notification rendering
Maria-Lordwill May 11, 2026
c7061c7
46129 fix(fieldsets): include fieldset file attachments in attachment…
Maria-Lordwill May 11, 2026
54551e3
46129 fix(fieldsets): disable Save/Start button when fieldset contain…
Maria-Lordwill May 11, 2026
7b7910e
46129 fix(highlights): show kickoff output fields for WorkflowRun events
Maria-Lordwill May 12, 2026
0617284
46129 fix(fieldsets): synchronize fieldsets catalog loading before te…
Maria-Lordwill May 12, 2026
c53259f
45773 feat(fieldsets): update fieldsets API: add template_id to the r…
pneumojoseph May 12, 2026
097575e
46129 fix(fieldsets): wrap createFieldset and deleteFieldset in call(…
Maria-Lordwill May 12, 2026
47056ce
Merge branch 'backend/fieldsets/45773__fieldsets' of github.com:pneum…
Maria-Lordwill May 12, 2026
835ebc3
46129 fix(fieldsets): redirect to templates list when template not fo…
Maria-Lordwill May 12, 2026
c753989
46129 fix(fieldsets): validate template ownership on fieldset detail …
Maria-Lordwill May 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BACKEND_URL=http://localhost:8001
FRONTEND_URL=http://localhost
FORMS_URL=http://form.localhost
ENVIRONMENT=Development
ENABLE_LOGGING=yes
ENABLE_LOGGING=no
DJANGO_DEBUG=yes
DJANGO_SETTINGS_MODULE=src.settings
DJANGO_SECRET_KEY=django_secret_django_secret_django_secret
Expand Down
2 changes: 1 addition & 1 deletion backend/src/accounts/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/accounts/locale/django.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/accounts/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/accounts/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/accounts/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/analysis/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/analysis/locale/django.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/analysis/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/analysis/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/analysis/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/authentication/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/authentication/locale/django.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/authentication/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/authentication/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/authentication/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/datasets/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/datasets/locale/django.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/datasets/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/datasets/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/datasets/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
8 changes: 4 additions & 4 deletions backend/src/datasets/services/dataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional
from typing import Dict, List, Optional

from django.contrib.auth import get_user_model
from django.db import IntegrityError
Expand Down Expand Up @@ -37,7 +37,7 @@ def _create_instance(

def _create_related(
self,
items: Optional[List[Dict[str, Any]]] = None,
items: Optional[List[Dict]] = None,
**kwargs,
):
if items:
Expand Down Expand Up @@ -82,7 +82,7 @@ def delete(self) -> None:

def create_items(
self,
items_data: List[Dict[str, Any]],
items_data: List[Dict],
):
service = DataSetItemService(
user=self.user,
Expand All @@ -97,7 +97,7 @@ def create_items(

def update_items(
self,
items_data: List[Dict[str, Any]],
items_data: List[Dict],
):
""" All dataset items will be updated """

Expand Down
6 changes: 0 additions & 6 deletions backend/src/datasets/services/dataset_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ def _create_instance(
) from ex
return self.instance

def _create_related(self, **kwargs):
pass

def partial_update(
self,
force_save: bool = True,
Expand All @@ -54,6 +51,3 @@ def partial_update(
message=MSG_DS_0002(value=self.instance.value),
) from ex
return self.instance

def delete(self) -> None:
self.instance.delete()
4 changes: 3 additions & 1 deletion backend/src/generics/base/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def __init__(
self.instance = instance
self.update_fields = set()

@abstractmethod
def _create_related(
self,
**kwargs,
Expand Down Expand Up @@ -78,3 +77,6 @@ def partial_update(
if force_save:
self.save()
return self.instance

def delete(self) -> None:
self.instance.delete()
67 changes: 61 additions & 6 deletions backend/src/generics/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
UserDateFormat,
)
from src.accounts.models import Account
from src.processes.models.templates.template import Template
from src.generics.messages import (
MSG_GE_0002,
MSG_GE_0007,
MSG_GE_0020,
)


class AccountPrimaryKeyRelatedField(serializers.PrimaryKeyRelatedField):
class AccountQstMixin:

def _get_account(self) -> Account:
account = self.context.get('account')
Expand All @@ -28,14 +29,31 @@ def _get_account(self) -> Account:
account = request.user.account
if not account:
raise Exception(
'Account not provided for AccountPrimaryKeyRelatedField',
'Account not provided for AccountQstMixin',
)
return account


class TemplateQstMixin:

def _get_template(self) -> Template:
template = self.context.get('template')
if not template:
raise Exception(
'Template not provided for TemplateQstMixin',
)
return template


class AccountPrimaryKeyRelatedField(
AccountQstMixin,
serializers.PrimaryKeyRelatedField,
):

def get_queryset(self):
queryset = super().get_queryset()
account = self._get_account()
if account is None or queryset is None:
if queryset is None:
raise Exception(MSG_GE_0002)
return queryset.filter(account=account)

Expand All @@ -53,6 +71,30 @@ def to_internal_value(self, data):
return super().to_internal_value(data)


class RelatedApiNameField(
AccountQstMixin,
TemplateQstMixin,
serializers.SlugRelatedField,
):

def __init__(self, **kwargs):
super().__init__(slug_field='api_name', **kwargs)

def get_queryset(self):
queryset = super().get_queryset()
account = self._get_account()
template = self._get_template()
if queryset is None:
raise Exception(MSG_GE_0002)
return queryset.filter(account=account, template=template)

def to_internal_value(self, data):

"""Convert api_name -> to object before saving """

return super().to_internal_value(data)


class AnyField(serializers.Field):

def to_internal_value(self, data):
Expand All @@ -65,15 +107,28 @@ def to_representation(self, value):
class RelatedListField(serializers.ListField):

def to_representation(self, objects):
"""
List of objects -> List of objects ids.
"""

""" List of objects -> List of objects ids """

return [
self.child.to_representation(item.id)
for item in objects.all()
]


class RelatedApiNameListField(serializers.ListField):

child = serializers.CharField()

def to_representation(self, data):

""" List of objects -> List of objects api_name's """

if hasattr(data, 'all'):
return [field.api_name for field in data.all()]
return [field.api_name for field in data if hasattr(field, 'api_name')]


class CommaSeparatedListField(serializers.ListField):

def get_value(self, dictionary):
Expand Down
2 changes: 1 addition & 1 deletion backend/src/generics/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/generics/locale/django.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/generics/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-07 11:48+0000\n"
"POT-Creation-Date: 2026-04-13 23:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
Loading