Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent UI behavior and server error when canceling group creation #1248

Closed
hackdna opened this issue Jul 14, 2016 · 2 comments
Closed

Comments

@hackdna
Copy link
Member

hackdna commented Jul 14, 2016

Commit: ec43d5b

Steps to reproduce

  1. Click on Collaboration link
  2. Click on the + sign to open group creation dialog box
  3. Click on the Cancel button in the dialog box

Observed behavior

  • Modal dialog with the message "Group Name cannot be left blank - try a different name." is displayed
  • Internal server error logged:
Traceback (most recent call last):

  File "/home/ubuntu/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/tastypie/resources.py", line 202, in wrapper
    response = callback(request, *args, **kwargs)

  File "/home/ubuntu/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/tastypie/resources.py", line 433, in dispatch_list
    return self.dispatch('list', request, **kwargs)

  File "/home/ubuntu/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/tastypie/resources.py", line 465, in dispatch
    response = method(request, **kwargs)

  File "/home/ubuntu/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/tastypie/resources.py", line 1341, in post_list
    updated_bundle = self.obj_create(bundle, **self.remove_api_resource_names(kwargs))

  File "/srv/refinery-platform/refinery/core/api.py", line 1944, in obj_create
    new_ext_group.user_set.add(user)

  File "/home/ubuntu/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/db/models/fields/related.py", line 773, in __get__
    through=self.related.field.rel.through,

  File "/home/ubuntu/.virtualenvs/refinery-platform/local/lib/python2.7/site-packages/django/db/models/fields/related.py", line 524, in __init__
    (instance, source_field_name))

ValueError: "<ExtendedGroup: >" needs to have a value for field "group" before this many-to-many relationship can be used.

Expected behavior

  • No messages
  • No internal server error
@mccalluc
Copy link
Member

Note: if you do provide a name and then hit cancel, it does create a new group; ie, the handling of a blank name is correct, I think, but the cancel button seems to do the same thing as "Create Group"

@hackdna
Copy link
Member Author

hackdna commented Sep 21, 2016

@hackdna hackdna modified the milestones: v1.5.0, Next Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants