You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get error File "D:/0work/Transfer/central/central.py", line 125, in <module> manager.create_api(ClientOut, methods=['GET'], primary_key='JobID') File "C:\Users\frane\AppData\Local\Continuum\Anaconda3\lib\site-packages\flask_restless\manager.py", line 830, in create_api blueprint = self.create_api_blueprint(blueprint_name, *args, **kw) File "C:\Users\frane\AppData\Local\Continuum\Anaconda3\lib\site-packages\flask_restless\manager.py", line 604, in create_api_blueprint raise IllegalArgumentError(msg) flask_restless.manager.IllegalArgumentError: Provided model must have anid attribute
There should be way to define alternative id attribute name.
The text was updated successfully, but these errors were encountered:
I'm working with legacy database table where primary key is not named
id
butJobID
orID,
so when I trymanager.create_api(PhClientOut, primary_key='JobID', methods=['GET'])
I get error
File "D:/0work/Transfer/central/central.py", line 125, in <module> manager.create_api(ClientOut, methods=['GET'], primary_key='JobID') File "C:\Users\frane\AppData\Local\Continuum\Anaconda3\lib\site-packages\flask_restless\manager.py", line 830, in create_api blueprint = self.create_api_blueprint(blueprint_name, *args, **kw) File "C:\Users\frane\AppData\Local\Continuum\Anaconda3\lib\site-packages\flask_restless\manager.py", line 604, in create_api_blueprint raise IllegalArgumentError(msg) flask_restless.manager.IllegalArgumentError: Provided model must have an
idattribute
There should be way to define alternative
id
attribute name.The text was updated successfully, but these errors were encountered: