appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

fix for null issue during document create event

Open manishkumar-dsi opened this issue 3 years ago • 0 comments

  • Added null & undefined type check in form.js

What does this PR do?

Fix for the defect. It does the null check on value for array type field.

Test Plan

Pre-requisite:

  • Go to 'Database' page and create a new 'Collection'
  • Create attributes, here at least one attribute should be marked 'Array' as required & 'Required' as optional.
  • Once 'Collection' is created.

Test case - 1:

  1. Go to Create a new 'Document' page
  2. Click on 'Add Attribute' for 'Array' attribute minimum 2 times
  3. Do not enter anything in the Value field
  4. Create the Document and the document should be created with empty values

Test case - 2:

  1. Go to Create a new 'Document' page
  2. Click on 'Add Attribute' for 'Array' attribute 1 time
  3. Do not enter anything in the Value field
  4. Create the Document and the document should be created with empty values

Test case - 3:

  1. Select any existing document
  2. Update data with different values.
  3. document should be updated

Related PRs and Issues

https://github.com/appwrite/appwrite/issues/3528

Have you read the Contributing Guidelines on issues?

Yes

manishkumar-dsi avatar Jul 23 '22 07:07 manishkumar-dsi