Uploaded image for project: 'SEBA'
  1. SEBA
  2. SEBA-512

Mapping of null/blank with optional/required modifier not deterministic in xosgenx

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: February
    • Component/s: NEM
    • Labels:
      None

      Description

      In the `map_xproto_to_django` code in this revision:

      https://gerrit.opencord.org/gitweb?p=xos.git;a=blob;f=lib/xos-genx/xosgenx/jinja2_extensions/django.py;h=724b85dc87ac319b0df47a30aefcbba08827b426;hb=HEAD#l85

      Depending on the order of iterating over the options list, giving a `null` or `blank` option might be set after the default values for those fields are set by the modifiers - `required` should set both null and blank to False, and `optional` sets both to True.

      Fix this, and address the use of null/blank as it relates to optional/required field modifiers.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              zdw Zack Williams
              Reporter:
              zdw Zack Williams
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes