Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor notes to remove requirement to edit code on new model #389

Open
3 tasks
Tracked by #29 ...
jon-nfc opened this issue Nov 15, 2024 · 0 comments
Open
3 tasks
Tracked by #29 ...

refactor notes to remove requirement to edit code on new model #389

jon-nfc opened this issue Nov 15, 2024 · 0 comments
Labels
type::feature Issue Type
Milestone

Comments

@jon-nfc
Copy link
Member

jon-nfc commented Nov 15, 2024

Currently when adding a new tenancy model, you must edit the notes code for that model to be able to add notes.

Details

refactor the notes so that the model name is used instead of hard coded logic to add a note to a model.

Current code

config_group = models.ForeignKey(
ConfigGroups,
on_delete=models.CASCADE,
default = None,
null = True,
blank= True
)
device = models.ForeignKey(
Device,
on_delete=models.CASCADE,
default = None,
null = True,
blank= True
)
service = models.ForeignKey(
Service,
on_delete=models.CASCADE,
default = None,
null = True,
blank= True
)
software = models.ForeignKey(
Software,
on_delete=models.CASCADE,
default = None,
null = True,
blank= True
)
operatingsystem = models.ForeignKey(
OperatingSystem,
on_delete=models.CASCADE,
default = None,
null = True,
blank= True
)

This logic must be adjusted to use an item_id? and a model. Where item_id is the models PK the note is for and model is the model name.

Links

Requirements

@jon-nfc jon-nfc added this to the v1.4 - UI / API Refactor milestone Nov 15, 2024
@jon-nfc jon-nfc moved this to Planning in Centurion ERP Nov 15, 2024
@jon-nfc jon-nfc moved this from Planning to Backlog in Centurion ERP Nov 25, 2024
@jon-nfc jon-nfc removed the status in Centurion ERP Nov 25, 2024
@jon-nfc jon-nfc moved this to Planning in Centurion ERP Nov 25, 2024
@jon-nfc jon-nfc added type::feature Issue Type and removed type::task Issue Type task::refactor labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature Issue Type
Projects
Status: Planning
Development

No branches or pull requests

1 participant