Document#touch broken

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.1.6, 8.1.7
    • Component/s: Persistence
    • None
    • None
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Reported on GitHub: https://github.com/mongodb/mongoid/discussions/5913

      A backported change broke the touch method. field is no longer nil, but an empty string in some cases, which means the line below should be fixed:

      https://github.com/mongodb/mongoid/blob/8.1-stable/lib/mongoid/touchable.rb#L42

      Proposed fix:

      if field.present?
      

            Assignee:
            Darshana Venkatesh
            Reporter:
            Jamis Buck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: