- Dec 21, 2017
-
-
Benjamin Bertrand authored
-
- Dec 06, 2017
-
-
Benjamin Bertrand authored
- Several IPs (hosts) can be associated to one MAC address - Host name shall be non nullable
-
Benjamin Bertrand authored
- refactor Network class
-
- Nov 26, 2017
-
-
Benjamin Bertrand authored
-
- Nov 21, 2017
-
-
Benjamin Bertrand authored
-
- Nov 20, 2017
-
-
Benjamin Bertrand authored
- network name should be unique and not nullable - force all name fields to StringField
-
- Nov 15, 2017
-
-
Benjamin Bertrand authored
Don't ovveride SQLAlchemy __init__ method on db.Model classes. See http://flask-sqlalchemy.pocoo.org/2.3/quickstart/: SQLAlchemy adds an implicit constructor to all model classes which accepts keyword arguments for all its columns and relationships. If you decide to override the constructor for any reason, make sure to keep accepting **kwargs and call the super constructor with those **kwargs to preserve this behavior
-
Benjamin Bertrand authored
-
- Nov 14, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
Use full exception error as message (error messages from psycopg2 can be quite long but that makes it much more explicit)
-
Benjamin Bertrand authored
TODO: we should maybe raise ValidationError in models and catch that to raise CSEntryError in the API
-
Benjamin Bertrand authored
The database constraints will catch the same error (and raise an IntegrityError). Having some validation at the model level allows to display nicer error messages. We use CSEntryError exception and not ValidationError so that it can be used both by the API and views.
-
- Nov 13, 2017
-
-
Benjamin Bertrand authored
- Allow to pass several mandatory fields in create_generic_model - Add tests
-
- Nov 03, 2017
-
-
Benjamin Bertrand authored
-
- Sep 21, 2017
-
-
Benjamin Bertrand authored
- catch IntegrityError on patch - disable autoflush (IntegrityError was raised before commit due to autoflush)
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
- Sep 17, 2017
-
-
Benjamin Bertrand authored
Pass ?qrcode=true as query string
-
- Sep 08, 2017
-
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
- use same postgres container for dev and test (create 2 different databases) - use docker-compose.override.yml to avoid duplication - ignore more files not needed in the docker image By default docker-compose reads both docker-compose.yml and docker-compose.override.yml. In docker-compose.override.yml we mount the current directory as a volume for development. To test the image we only use docker-compose.yml: - don't force port 5432 to the outside world to avoid conflict - do not mount the current directory
-
- Sep 07, 2017
-
-
Benjamin Bertrand authored
Can use: - /api/items?serial_number=123456 - /api/items?location_id=1
-
- Sep 06, 2017
-
-
Benjamin Bertrand authored
- add more tests - patching an item update children location and status - setting the parent on an item updates the location and status with the parent ones
-
Benjamin Bertrand authored
-
Benjamin Bertrand authored
-
- Aug 28, 2017
-
-
Benjamin Bertrand authored
Put under the functional directory all tests that require access to the database. There is a "session" fixture in that directory that is automatically invoked for each tests. It rollbacks any transaction after the test to leave the database clean. Other tests should go under the unit directory. Inspired from: - https://stackoverflow.com/a/38626139 - http://alexmic.net/flask-sqlalchemy-pytest/
-
- Aug 22, 2017
-
-
Benjamin Bertrand authored
-