Uploaded image for project: 'ui-items'
  1. ui-items
  2. UIIT-31

Item creation fails when no loan-type is provided: invalid input syntax for uuid: "Select loan type"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Labels:
    • Template:

      Description

      If you create a new items and specify only the title and barcode, then the attempt to create new record fails:

      POST /inventory/items
      {
         "barcode" : "2",
         "available_material_types" : [
            {
               "name" : "book",
               "id" : "1a54b431-2e4f-452d-9cae-9cee66c9a892"
            },
            {
               "name" : "dvd",
               "id" : "5ee11d91-f7e8-481d-b079-65d708582ccc"
            }
         ],
         "status" : {
            "name" : "Available"
         },
         "materialType" : {
            "id" : "1a54b431-2e4f-452d-9cae-9cee66c9a892"
         },
         "id" : "4d469537-b5f0-4982-b078-2d33320ce335",
         "available_loan_types" : [
            {
               "id" : "2b94c631-fca9-a892-c730-03ee529ffe27",
               "name" : "Can circulate"
            },
            {
               "name" : "Course reserves",
               "id" : "e8b311a6-3b21-03f2-2269-dd9310cb2d0e"
            },
            {
               "id" : "2e48e713-17f3-7c13-09f8-23845bb210a4",
               "name" : "Reading room"
            }
         ],
         "permanentLoanType" : {
            "id" : "Select loan type"
         },
         "instanceId" : "dummy",
         "location" : {
            "name" : "Somewhere"
         },
         "title" : "Avocados are Adequate"
      }
      
      400 Bad Request
      invalid input syntax for uuid: "Select loan type"
      

      (There is a lot of additional crud in this record that ought not to be there, but let's deal with one thing at a time.)

        TestRail: Results

          Attachments

            Activity

              People

              Assignee:
              mike Mike Taylor
              Reporter:
              mike Mike Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 15 minutes
                  1h 15m

                    TestRail: Runs

                      TestRail: Cases