Draft
Conversation
This was breaking _unregister_controllers since we don't get tuples
but EndpointRule objects.
Prior to this change the call failed like
File /odoo/external-src/shopfloor-app/shopfloor_base/models/shopfloor_app.py, line 166, in _registered_endpoint_rule_keys
return [x[0] for x in self._registered_routes()]
~^^^
TypeError: 'EndpointRule' object is not subscriptable
* ensure manifest url is always the same * improve comparison on handler options
The app was not using at all the base_rest dispatcher for restapi route type. This is because by default endpoint.route.handler use only http or json
Contributor
|
Thank you @simahawk. I take this PR on my TODO list. |
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of OCA/shopfloor-app#19
shopfloor_base: fix _registered_endpoint_rule_keys
This was breaking _unregister_controllers since we don't get tuples
but EndpointRule objects.
Prior to this change the call failed like
How to reproduce: archive an app and sync registry (or directly call the method on an existing active app).
shopfloor_base: fix routing registration (the most important fix)
This prevented the usage of the
fastapidispatcher leading - among other things - to broken handling of server side errors as exceptions are not wrapped.How to reproduce: raise an exception server side (eg: override the 1st method of a scenario to raise an exception in any case) and see on the screen an alert w/ "undefined undefined" instead of a nice error message.
TODO
@lmignon I have no time to test this on 16 so I simply backported the fixes. Could you have a look?
Migrations scripts should be also ported (w/o the "readonly" flag) iif the issue is confirmed as all the existing routes should be updated.