-
Notifications
You must be signed in to change notification settings - Fork 81
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
Metadata forms: List of Attached Forms #1652
base: main
Are you sure you want to change the base?
Metadata forms: List of Attached Forms #1652
Conversation
Number of attached entities per version
One bug I see - Env and Org Forms not showing to Attach to S3 Dataset Entity Anymore Just need to change to |
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.
some minor comments
Is access restrictions to be reconsidered later - just curious to hear thoughts here, I think outside scope of this PR for now
frontend/src/modules/Metadata_Forms/components/MetadataFormAttachedEntities.js
Outdated
Show resolved
Hide resolved
frontend/src/modules/Metadata_Forms/components/MetadataFormAttachedEntities.js
Outdated
Show resolved
Hide resolved
frontend/src/modules/Metadata_Forms/components/MetadataFormAttachedEntities.js
Outdated
Show resolved
Hide resolved
frontend/src/modules/Metadata_Forms/components/MetadataFormAttachedEntities.js
Outdated
Show resolved
Hide resolved
All done |
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.
Minor Comment on Theme(s)
One Bug Found (described below)
Bug when updating an already attached metadata form with a boolean value...
-
If there already exists an attached MF with a boolean value and I have a new MF Form version still with the same boolean value
- When I click edit - the fields get carried over to new version
- These field values are from
AttachedMetadataForm.fields
property returned fromlistAttachedMetadataForms
API and the values are returned as strings - Meaning a boolean value is returned as
'false'
-
If I keep the boolean value as is and try to save this new version of the attached form I get an error
(builtins.TypeError) Not a boolean value: 'false' [SQL: INSERT INTO boolean_attached_metadata_form_field ("attachedFormUri", "fieldUri", value) VALUES (%(attachedFormUri)s, %(fieldUri)s, %(value)s)] [parameters: [{'value': 'false', 'attachedFormUri': 'XXX', 'fieldUri': 'XXXX'}]]
- Believe something is going on with boolean returned as string ++`JSON.stringify(field.value)` used before running `createAttachedMetadataForm`
- Looking at Lambda event the value comes in as `"\"false\""` which then gets loaded as `'false'` after json.loads(xxx) and then this string throws the error because not bool type
Ultimately, I get left with an error and 2 attached metadata forms of 2 different versions because createAttachedMetadataForm
is also not cleaning up the pre-existing one due the error
frontend/src/modules/Metadata_Forms/components/MetadataFormAttachedEntities.js
Outdated
Show resolved
Hide resolved
frontend/src/modules/Metadata_Forms/components/metadataAttachment.js
Outdated
Show resolved
Hide resolved
bugs with attachement and values resolved |
Feature or Bugfix
Detail
Relates
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.