lemonadelabs / django-merlin

The web backend for Merlin, written on the Django web framework.
1 stars 0 forks source link

Make `description` an optional field of PUT requests #12

Closed will-sklenars closed 8 years ago

will-sklenars commented 8 years ago

This is the error I get when updating and entity or output resource.

{"description":["This field may not be blank."]}

I have made a hacky front end fix for this in the form of: entity.description = 'asdf' This could be solved by making description an optional field.

ty!

Or4c commented 8 years ago

I'm on it...

Or4c commented 8 years ago

I think I've fixed it, pull the latest from django-merlin and remember to run migrate

will-sklenars commented 8 years ago

This is working, except for the entities that have no inputs or outputs. Such as:

    {
        "id": 3,
        "description": "",
        "name": "the storage",
        "attributes": [],
        "parent": "http://192.168.99.100:8000/api/entities/2/",
        "sim": "http://192.168.99.100:8000/api/simulations/1/",
        "is_source": false,
        "children": [
            "http://192.168.99.100:8000/api/entities/10/",
            "http://192.168.99.100:8000/api/entities/9/",
            "http://192.168.99.100:8000/api/entities/8/",
            "http://192.168.99.100:8000/api/entities/7/",
            "http://192.168.99.100:8000/api/entities/6/",
            "http://192.168.99.100:8000/api/entities/5/",
            "http://192.168.99.100:8000/api/entities/4/",
            "http://192.168.99.100:8000/api/entities/1/"
        ],
        "outputs": [],
        "inputs": [],
        "processes": [],
        "display_pos_x": null,
        "display_pos_y": null
    },
   {
        "id": 2,
        "description": "",
        "name": "the branch",
        "attributes": [
            "capability",
            "branch"
        ],
        "parent": null,
        "sim": "http://192.168.99.100:8000/api/simulations/1/",
        "is_source": false,
        "children": [
            "http://192.168.99.100:8000/api/entities/3/"
        ],
        "outputs": [],
        "inputs": [],
        "processes": [],
        "display_pos_x": null,
        "display_pos_y": null
    },
will-sklenars commented 8 years ago

Cool, this is working now. Thanks.