-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add default values for fk_provider and fk_dataowner #173
Add default values for fk_provider and fk_dataowner #173
Conversation
for more information, see https://pre-commit.ci
…thub.com/cymed/TEKSI-wastewater into default_values_for_fk_provider_dataowner
for more information, see https://pre-commit.ci
…thub.com/cymed/TEKSI-wastewater into default_values_for_fk_provider_dataowner
Should solve #135 |
25a25de
to
dcf0590
Compare
…thub.com/cymed/TEKSI-wastewater into default_values_for_fk_provider_dataowner
for more information, see https://pre-commit.ci
@cymed Can you add some documentation how to use this feature? Where do you add or select the default dataowner / provider? Screenshots? |
shell needs different formatting than python
for more information, see https://pre-commit.ci
Is the solution ok like this (default handling by sysadmin only in tww_sys)? |
@urskaufmann @ponceta @varrieta and others - your more in daily business |
In most cases, this should be ok. I have some databases with more than one dataowner. In this case it would be better, when also non-admin-users can change the default value (or I show them how to set a default in the attributform. If I set a default in the attributform, will it overwrite the default, that comes from tww_sys?) |
if you want regular users to alter the default values, it must not be in tww_sys as tww_user does not have the necessary rights for it. |
@ponceta ready for review, feedback from @urskaufmann was included in #615edd6 |
Co-authored-by: Arnaud Poncet-Montanges <[email protected]>
This is great and simplify greatly the fk_provider and fk_dataowner process. |
This pr adds a metatable in tww_od (in first few pushes it was tww_sys) and the corresponding function to manage default values of any obj_id type. For now, only fk_provider and fk_dataowner are implemented. The functionality can easily be expanded for any obj_id based fk i.e. fk_pipe_profile.