Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3666

update nested attribute didn't check for nil

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.1
    • Affects Version/s: None
    • Component/s: None

      https://github.com/mongoid/mongoid/blob/master/lib/mongoid/relations/builders/nested_attributes/many.rb#L102

      This line doc will be nil if the id passed in does not exist, should've have a nil check to catch appropriate errors and queue it in active record errors object.

      Related to: https://github.com/mongoid/mongoid/issues/2484 because it is still ocurring

            Assignee:
            Unassigned Unassigned
            Reporter:
            pencilcheck pencilcheck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: