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

update nested attribute didn't check for nil

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: 6.1.1
    • Component/s: None
    • Labels:

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: