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

Wizard Step 1: Editing Description results in Unexpected Error #3890

Closed
mariobehling opened this issue Jan 29, 2020 · 6 comments · Fixed by #3980
Closed

Wizard Step 1: Editing Description results in Unexpected Error #3890

mariobehling opened this issue Jan 29, 2020 · 6 comments · Fixed by #3980

Comments

@mariobehling
Copy link
Member

When the user tries to edit the "Description" area in step 1 of the wizard an "Unexpected Error" appears. If the user refreshes the wizard and copy/pastes the info it works, but initially it always shows the error.

Screenshot from 2020-01-29 10-46-58

@kushthedude
Copy link
Member

@iamareebjamal Same error which was shown in case for Private Events.

INFO:werkzeug:127.0.0.1 - - [29/Jan/2020 16:01:55] "PATCH /v1/events/b98d53be HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/sentry_sdk/integrations/flask.py", line 70, in sentry_patched_wsgi_app
    environ, start_response
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/sentry_sdk/integrations/wsgi.py", line 120, in __call__
    reraise(*_capture_exception(hub))
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/sentry_sdk/_compat.py", line 57, in reraise
    raise value
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/sentry_sdk/integrations/wsgi.py", line 116, in __call__
    _sentry_start_response, start_response, span
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/sentry_sdk/integrations/flask.py", line 69, in <lambda>
    return SentryWsgiMiddleware(lambda *a, **kw: old_app(self, *a, **kw))(
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/kush/open-event-server/app/instance.py", line 69, in __call__
    return self.app(environ, start_response)
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/kush/open-event-server/venv/src/flask-rest-jsonapi/flask_rest_jsonapi/api.py", line 133, in decorated
    return self.check_permissions(view, view_args, view_kwargs, *args, **kwargs)
  File "/Users/kush/open-event-server/app/api/helpers/permission_manager.py", line 509, in permission_manager
    return permissions[args[0]](view, view_args, view_kwargs, *args, **kwargs)
  File "/Users/kush/open-event-server/app/api/helpers/permissions.py", line 48, in decorator
    return fn(*args, **kwargs)
  File "/Users/kush/open-event-server/app/api/helpers/permission_manager.py", line 73, in is_coorganizer
    return view(*view_args, **view_kwargs)
  File "/Users/kush/open-event-server/venv/src/flask-rest-jsonapi/flask_rest_jsonapi/decorators.py", line 32, in wrapper
    return func(*args, **kwargs)
  File "/Users/kush/open-event-server/venv/lib/python3.7/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/Users/kush/open-event-server/venv/src/flask-rest-jsonapi/flask_rest_jsonapi/resource.py", line 68, in dispatch_request
    response = method(*args, **kwargs)
  File "/Users/kush/open-event-server/venv/src/flask-rest-jsonapi/flask_rest_jsonapi/decorators.py", line 56, in wrapper
    return func(*args, **kwargs)
  File "/Users/kush/open-event-server/venv/src/flask-rest-jsonapi/flask_rest_jsonapi/resource.py", line 310, in patch
    self._data_layer.update_object(obj, data, kwargs)
  File "/Users/kush/open-event-server/venv/src/flask-rest-jsonapi/flask_rest_jsonapi/data_layers/alchemy.py", line 133, in update_object
    self.apply_relationships(data, obj)
  File "/Users/kush/open-event-server/venv/src/flask-rest-jsonapi/flask_rest_jsonapi/data_layers/alchemy.py", line 407, in apply_relationships
    related_model = getattr(obj.__class__, key).property.mapper.class_
AttributeError: 'property' object has no attribute 'property'

@kushthedude
Copy link
Member

Also here are the relationships getting sent by frontend https://github.com/fossasia/open-event-frontend/blob/development/app/serializers/event.js

@iamareebjamal
Copy link
Member

Yes, will fix this today on server as a workaround but it needs to be fixed in frontend mainly

@iamareebjamal
Copy link
Member

See if removing those 2 relationships does not break anything and fixes the issue because they are computed relationships, not real

@kushthedude
Copy link
Member

kushthedude commented Jan 29, 2020

See if removing those 2 relationships does not break anything and fixes the issue because they are computed relationships, not real

@iamareebjamal It is working after removing the orderStatistics Relationship. Also eventGeneralStatistic should not be removed as all the event statistics like Speakers, Session are coming through this relationship. I will take a look if we are using orderStatistics anywhere else in FE, if no I will make the PR for the fix.

@iamareebjamal
Copy link
Member

They should work even after removing manual linking. I'm not asking to remove if they are not used. I'm asking to remove knowing that they are used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants