-
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
Dss export: fix organisation.bemerkung length and allow vl extensions #171
Conversation
for more information, see https://pre-commit.ci
was increased in ili
This PR checks if a relation used in an interlis export has a distinct vsacode. If so, the vsacode is used to find the corresponding value_de in tww_vl.value_list_base. The option to use vsacodes can be turned off on function call.
for more information, see https://pre-commit.ci
@@ -445,7 +447,7 @@ def _export_organisation(self): | |||
**self.sia_405_base_common(row, "organisation"), | |||
# --- organisation --- | |||
auid=row.uid, | |||
bemerkung=self.truncate(self.emptystr_to_null(row.remark), 80), | |||
bemerkung=self.truncate(self.emptystr_to_null(row.remark), 255), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we have now the constraints in the datemodel
ALTER TABLE tww_od.organisation ADD CONSTRAINT og_remark_length_max_255 CHECK(char_length(remark)<=255); |
I am not sure if we still need the truncate here. If yes the correction is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constraints on the datamodel can be disabled. I would keep the truncation
Another exception to length of remark is with abwasserreinigung (also 255 instead of 80): Line 989 in a427c63
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check comment on truncate, else it looks good (without having tested if the use_vsa is working - but the option to use vsa code is welcomed.
use_vsa was tested using a database with vl extensions |
Error is:
Where is the script of TestInterlis.test_dss_dataset_import_export? I am not sure that the unit test fails because of the alterations |
changed from 80 to 255, see https://vsa.ch/models/2020_1/SIA405_Base_Abwasser_1_2_d_LV95-20231018.ili Line 139