pyeve / eve-sqlalchemy

SQLAlchemy data layer for Eve-powered RESTful APIs
http://eve-sqlalchemy.readthedocs.io
Other
232 stars 70 forks source link

Not honoring ITEM_URL #68

Closed erik-stephens closed 6 years ago

erik-stephens commented 9 years ago

Needing to support non-integer ID's, I configured Eve with a custom ITEM_URL but this line has it hard-coded - should be config.ITEM_URL. I can override another way but it may trip up others.

lingfish commented 9 years ago

I didn't have this issue, but it would be because I overrode thusly (for anyone else wondering how to):

DOMAIN['some-schema'].update({
    'item_url': 'regex(".+")',
...
ralphsmith80 commented 8 years ago

The issue is in decorators.py#L68. That value should reference the config object however, in my brief testing just using config.ITEM_URL will not reference the appropriate setting.

erik-stephens commented 8 years ago

@ralphsmith80 I think we're linking to the same line. For future reference, you probably want to link to a specific commit instead of a branch since the lines will change over time - it's bitten me a couple of times before.

ralphsmith80 commented 8 years ago

@erik-stephens I just submitted a pull request for this. The fix was crazy easy. If you can wait you can use my fork.