Commit Graph
100 Commits
Author SHA1 Message Date
OliverandGitHub b9fd263899 Docker improvements (#3042)
* Simplified dockerfile

- Changed from alpine to python:slim
- Removed some database libs (because we *connect* to a db, not host it)

* - Add gettext as required package
- Only create inventree user as part of production build (leave admin access for dev build)

* Tweaks for tasks.py

* Fix user permissions (drop to inventree user)

* Drop to the 'inventree' user level as part of init.sh

- As we have mounted volumes at 'run time' we need to ensure that the inventree user has correct permissions!
- Ref: https://stackoverflow.com/questions/39397548/how-to-give-non-root-user-in-docker-container-access-to-a-volume-mounted-on-the

* Adjust user setup

- Only drop to non-root user as part of "production" build
- Mounted external volumes make it tricky when in the dev build
- Might want to revisit this later on

* More dockerfile changes

- reduce required system packages
-

* Add new docker github workflow

* Print some more debug

* GITHUB_BASE_REF

* Add gnupg to base requirements

* Improve debug output during testing

* Refactoring updates for label printing API

- Update weasyprint version to 55.0
- Generate labels as pdf files
- Provide filename to label printing plugin
- Additional unit testing
- Improve extraction of some hidden debug data during TESTING
- Fix a spelling mistake (notifaction -> notification)

* Working on github action

* More testing

* Add requirement for pdf2image

* Fix label printing plugin and update unit testing

* Add required packages for CI

* Move docker files to the top level directory

- This allows us to build the production image directly from soure
- Don't need to re-download the source code from github
- Note: The docker install guide will need to be updated!

* Fix for docker ci file

* Print GIT SHA

* Bake git information into the production image

* Add some exta docstrings to dockerfile

* Simplify version check script

* Extract git commit info

* Extract docker tag from check_version.py

* Newline

* More work on the docker workflow

* Dockerfile fixes

- Directory / path issues

* Dockerfile fixes

- Directory / path issues

* Ignore certain steps on a pull request

* Add poppler-utils to CI

* Consolidate version check into existing CI file

* Don't run docker workflow on pull request

* Pass docker image tag through to the build

Also check .j2k files

* Add supervisord.conf example file back in

* Remove --no-cache-dir option from pip install
2022-05-29 09:40:37 +10:00
OliverandGitHub 09a4fab0d6 Adds 'quarantine' code for StockItemStatus (#3084)
* Adds 'quarantine' code for StockItemStatus

- Marks item as "unavailable"
- Removes unused code from StockItemStatus class

* Add migration file
2022-05-27 15:12:15 +10:00
OliverandGitHub 6c7a80c141 Check user permissions before performing search (#3083)
* Check user permissions before performing search

* JS linting
2022-05-27 13:26:45 +10:00
OliverandGitHub 640a5d0f24 Improve error management for order price calculation (#3075)
* Improve error management for order price calculation

- If there are missing exchange rates, it throws an error
- Very much an edge case

* Style fixes

* Add warning message if total order price cannot be calculated

* price -> cost
2022-05-27 13:26:37 +10:00
OliverandGitHub d1c92a9eda Update version.py
Fix typo?
2022-05-26 18:24:01 +10:00
OliverandGitHub 7ccc8ad10d Update version.py
Bump version number to indicate dev candidate for 0.8.0
2022-05-26 18:23:43 +10:00
OliverandGitHub 643df4761d Enable 'tree view' for build order table (#3070)
* Enable 'tree view' for build order table

* Ensure we pass locale code to the build table

* Adjust button class based on current context

* Fix display of 'child builds' table on build page

* Force a rebuild of the entire table when the filters are refreshed

* Refactor PurchaseOrder table also

* Refactor existing SalesOrder table also

* JS linting
2022-05-26 15:41:53 +10:00
OliverandGitHub 2d1776a151 Refactor 'DeleteManufacturerPart' form (#3067)
* Refactor 'DeleteManufacturerPart' form

- Remove duplicated forms
- Update style to match other forms
- Block on each deletion before progressing to the next one

* PEP fix

* Adds deleteSupplierParts function

* Refactor all instances of supplier part deletion

* Refactor tractor : use convenience function for bootstraptable.getSelections

* Add deleter for manufacturerpartparameter.

Refactor existing code into a single function

* Refactor deletion for stock items

* JS linting
2022-05-25 23:35:53 +10:00
OliverandGitHub 0e9ea1be0c Update CONTRIBUTING.md 2022-05-25 19:58:14 +10:00
OliverandGitHub 2378073c61 SalesOrderShipment improvements (#3058)
* Adds two new fields to SalesOrderShipment model:

- Invoice number (char)
- Link (URL)

* Bump API version

* Update API / serializer / JS

- Allow entry of new fields at time of shipping

* PEP fixes

* Actually fix the PEP issues

* Unit testing: check some more fields
2022-05-25 11:00:19 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
063375557f L10 crowdin (#3063)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-24 20:29:17 +10:00
OliverandGitHub ea9f2f81f1 Stock available (#3057)
* Fix display of stock labels

- If 'shipped' or 'installed', don't display 'allocated' flag

* Switch stock item data around

* Add 'available' and 'allocation' information to the StockItem detail page

- Cache some context data to the view renderer

* Stock table now also displays allocation informatoin
2022-05-24 15:35:04 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
c0b74e18ac L10 crowdin (#3051)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-23 14:07:08 +10:00
OliverandGitHub 3c02b95f85 Shipment date edit (#3050)
* Allow user to select shipment date when shipping a salesorder

- Defaults to 'today'

* Retain the tracking number information through the from

* JS linting

* Add unit testing for the SalesOrderShipmentComplete serializer / API endpoint
2022-05-23 13:57:40 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
40153b94a5 L10 crowdin (#3045)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-22 09:18:07 +10:00
OliverandGitHub c2b2896f45 Merge pull request #3041 from matmair/style-fixes
Style fixes
2022-05-22 08:39:09 +10:00
OliverandGitHub 624a6ebb6c Merge pull request #3043 from maksimstojkovic/fr-2986-shipment-page-action
Complete Allocated Pending Orders from SO Page Actions Menu
2022-05-21 23:45:29 +10:00
OliverandGitHub 8eaf172512 Merge pull request #3040 from matmair/test-simplify
Test simplify
2022-05-21 19:41:23 +10:00
OliverandGitHub 5a760e5ad3 Merge pull request #3044 from matmair/fix-test-cfg-file
[BUG] Remove repo name from assertation
2022-05-21 07:39:18 +10:00
OliverandGitHub bd195105e7 Merge pull request #2991 from matmair/not-working-tests
Static test fixes
2022-05-20 20:46:28 +10:00
OliverandGitHub 620dca09a4 Merge pull request #3038 from SchrodingersGat/search-results-fix
Search Results Fix
2022-05-20 18:36:23 +10:00
Oliver cc59ef65fc PEP fixes 2022-05-20 17:31:08 +10:00
Oliver 33bab19abb Better reporting of settings errors 2022-05-20 17:29:18 +10:00
Oliver 8da278a072 Adds option to hide unavailable stock items from the search preview window 2022-05-20 17:10:51 +10:00
Oliver 0f4ed55bed JS fixes 2022-05-20 17:02:28 +10:00
Oliver 8ad141f910 Add extra options to control search results in preview window
- Allow user to optionally show / hide inactive purchase orders
- Allow user to optionally show / hide inactive sales orders
2022-05-20 16:57:30 +10:00
OliverandGitHub c9d4268c34 Merge pull request #3000 from matmair/devOps
DevOps improvements
2022-05-20 13:55:57 +10:00
OliverandGitHub 8385080e4c Merge pull request #3036 from maksimstojkovic/auto-reload-so
Primitive solution to SO reload on shipment
2022-05-19 21:16:24 +10:00
OliverandGitHub 90235a2bb1 Merge pull request #3035 from SchrodingersGat/setting-unit-tests
Expand unit tests for settings
2022-05-19 20:23:18 +10:00
Oliver Walters e93b138de4 Expand unit tests for settings
- Check that name and description are translated
- Check for only allowed keys
- Extend checks to include user settings
- Check default value for boolean setting
2022-05-19 19:49:39 +10:00
OliverandGitHub 1bff1868fd Merge pull request #3034 from SchrodingersGat/plugin-panels-test
Plugin panels test
2022-05-19 14:30:03 +10:00
OliverandGitHub 0c02e57b58 Merge pull request #3028 from maksimstojkovic/automatic-shipment-creation
[Feature] Create a default shipment when creating SO
2022-05-19 13:48:33 +10:00
OliverandGitHub 2ddaa9c04a Merge pull request #3020 from SchrodingersGat/download-unit-tests
Download unit tests
2022-05-19 13:34:41 +10:00
Oliver 07319731d2 Validate that errors get logged 2022-05-19 13:20:42 +10:00
Oliver adaec90909 CI: Allow exchange rate test a few goes 2022-05-19 12:54:07 +10:00
Oliver af88f6ec97 python CI: wait for server before continuing 2022-05-19 11:55:53 +10:00
Oliver 80e3d0970a Adds unit tests for the samplepanel plugin 2022-05-19 11:28:18 +10:00
Oliver 11b21a9cca Allow registry.with_mixin to filter by active status 2022-05-19 11:00:31 +10:00
Oliver ebcb9685b5 Updates to samplepanel plugin
- Enhanced content for "hello world" panel
- Add an optional panel which breaks rendering
2022-05-19 10:04:20 +10:00
Oliver 14b60cdedc Custom panel content gets passed through the templating engine 2022-05-19 10:03:44 +10:00
Oliver 7d9690b974 Add logging message when plugin fails to render custom panels 2022-05-19 09:53:12 +10:00
Oliver 9446702d78 Skip plugin loading for various database admin functions 2022-05-19 09:45:16 +10:00
OliverandGitHub e1a0261888 Merge pull request #3032 from rkalman/fix-mfpartdetailtemplate
Fix manufacturer part detail template
2022-05-19 08:31:08 +10:00
Oliver Walters 0831b85e29 Adding some unit tests for SalesOrderLineItem API 2022-05-19 01:39:16 +10:00
OliverandGitHub 8ceff063f8 Merge pull request #3027 from SchrodingersGat/locate-plugin-fix
Fix broken calls to offload_task
2022-05-18 23:42:26 +10:00
Oliver Walters c6590066b8 Add tests for successful location
- Sample plugin now updates metadata tag
2022-05-18 22:46:15 +10:00
Oliver Walters dd476ce796 Add unit tests for the 'locate' plugin
- Test various failure modes
- Some of the failure modes didn't fail - this is also a failure
- Fixing API code accordingly
2022-05-18 22:20:29 +10:00
OliverandGitHub d6ebf3fc24 Merge pull request #2912 from sur5r/issue2314
Implement Attachments for manufacturer parts
2022-05-18 22:14:08 +10:00
Oliver Walters 0e0ba66b9a Fix broken calls to offload_task 2022-05-18 21:40:53 +10:00
Oliver Walters aa3a86f372 Exclude metadata from StockLocation and StockItem model resource class 2022-05-18 21:33:40 +10:00
OliverandGitHub 146335730e Merge pull request #3026 from SchrodingersGat/plugin-panel-error-catch
Catch errors when rendering custom plugin panels
2022-05-18 17:26:21 +10:00
Oliver 4ceb35a43f Fix PEP issue 2022-05-18 17:00:20 +10:00
Oliver 6147afe35f Catch errors when rendering custom plugin panels 2022-05-18 16:54:57 +10:00
OliverandGitHub bb83c0d53e Merge pull request #3025 from SchrodingersGat/docker-ci-fix
Docker ci fix
2022-05-18 16:15:59 +10:00
Oliver 2fde482eab Simplify steps 2022-05-18 15:39:58 +10:00
Oliver 3e05c5fde1 Bring docker containers down 2022-05-18 15:12:19 +10:00
Oliver ea3133be1d Combine docker-build and docker-test CI steps
- We are building anyway, may as well test
2022-05-18 15:11:37 +10:00
OliverandGitHub fd2ec03fab Merge pull request #2993 from SchrodingersGat/webp-support
webp image support
2022-05-18 14:43:28 +10:00
Oliver f53c8865ad Only run docker build on push 2022-05-18 14:14:40 +10:00
Oliver 810671f423 Yet another fix 2022-05-18 13:40:57 +10:00
Oliver 0f1dd3fe65 Same fix for config file test 2022-05-18 13:02:23 +10:00
Oliver e57087de63 Fix unit test 2022-05-18 12:19:10 +10:00
Oliver 3b53260d75 Allow some variation in unit test 2022-05-18 11:51:14 +10:00
Oliver 2cfa4c0a16 Merge remote-tracking branch 'matmair/webp-support' into webp-support
# Conflicts:
#	InvenTree/InvenTree/tests.py
2022-05-18 11:13:26 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
db75c31f6d Translation merge (#3022)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-18 08:27:42 +10:00
Oliver Walters b6c2ade940 Add unit test for downloading Part data 2022-05-18 07:52:29 +10:00
Oliver Walters 1c6d79451e Don't decode downloaded .xls file 2022-05-18 07:25:43 +10:00
Oliver Walters c5b14944a1 Unit tests for downloading BuildOrder data 2022-05-18 00:31:43 +10:00
Oliver Walters 0d078768fe Unit tests for downloading PurchaseOrder data 2022-05-18 00:08:11 +10:00
Oliver Walters a6be0b32c6 Add unit tests for exporting SalesOrder data 2022-05-17 23:48:58 +10:00
Oliver Walters 3488da19b0 Return data as a list of dict objects 2022-05-17 23:47:09 +10:00
Oliver Walters a44267c306 bug fix 2022-05-17 23:22:40 +10:00
Oliver Walters 920e7e0bb7 Adds helper function to process and validate a downloaded .csv file 2022-05-17 23:21:30 +10:00
Oliver Walters 55000d5c48 Add ability to download file as StringIO or BytesIO 2022-05-17 22:28:46 +10:00
Oliver Walters fd9f25dc0d Adds helper function for testing a file download via the api 2022-05-17 21:26:33 +10:00
OliverandGitHub a8eef0870c Merge pull request #3010 from SchrodingersGat/shipment-assign-fix
SalesOrderShipment allocation fix
2022-05-17 20:25:57 +10:00
OliverandGitHub d16a880417 Update README.md
Add link to coveralls badge
2022-05-17 20:19:12 +10:00
Oliver Walters f4b470c396 Merge remote-tracking branch 'inventree/master' into shipment-assign-fix 2022-05-17 18:48:57 +10:00
Oliver Walters dc2351748c Merge remote-tracking branch 'inventree/master' into webp-support 2022-05-17 18:48:19 +10:00
OliverandGitHub b08a98f7a4 Merge pull request #3018 from SchrodingersGat/remove-unicode-literals
Remove more python2 stuff
2022-05-17 17:26:55 +10:00
Oliver 9bcbaaa5f5 Remove more python2 stuff 2022-05-17 16:57:31 +10:00
OliverandGitHub c4dfb03fd2 Merge pull request #3017 from SchrodingersGat/build-output-delete-fix
Bug Fix: Build output delete API endpoint
2022-05-17 16:33:37 +10:00
Oliver e7b458978c More unit tests 2022-05-17 15:10:48 +10:00
Oliver 01a30935f0 Add unit tests for BuildOutputDelete serializer 2022-05-17 14:20:41 +10:00
Oliver 5a0acedce6 Add unit tests for BuildOutputCreate serializer 2022-05-17 13:00:53 +10:00
Oliver 256451d82b Fix context such that build output can be deleted 2022-05-17 11:52:42 +10:00
OliverandGitHub 334025b844 Merge pull request #3014 from matmair/matmair/issue3005
Add more tests for offload_task
2022-05-17 11:11:20 +10:00
Oliver Walters 825c50a438 Change import style 2022-05-17 08:40:43 +10:00
Oliver Walters aa7fcb3601 Remove status_code addition 2022-05-17 08:23:39 +10:00
Oliver Walters 027a7c88de Copy error implementation from django-error-report lib
Ref: https://github.com/mhsiddiqui/django-error-report/blob/master/error_report/middleware.py
2022-05-17 01:17:48 +10:00
OliverandGitHub 1b507d53d0 Merge pull request #3001 from matmair/devops-isort
Add isort
2022-05-17 01:06:48 +10:00
Oliver Walters 048f1ad601 Simplify DRF exception handler
- Check the default handler first
- If *any* other API requets throws an exception, will now pass through the custom handler
2022-05-17 01:03:02 +10:00
Oliver Walters 2509db2b88 JS linting 2022-05-17 00:52:01 +10:00
OliverandGitHub c51f052f25 Merge pull request #3011 from matmair/matmair/issue2996
Remove python 2 code
2022-05-17 00:51:31 +10:00
Oliver Walters 27930cd897 PEP style fixes 2022-05-17 00:41:03 +10:00
Oliver Walters 3373bb19f1 Remove unique_together requirement on SalesOrderAllocation model 2022-05-17 00:36:30 +10:00
Oliver Walters 263ac01727 Typo fix 2022-05-17 00:35:59 +10:00
Oliver Walters 6512c0061e Catch a 500 and make it a 400
While we are at it, convert __all__ to non_field_errors automatically
2022-05-17 00:35:24 +10:00
Oliver Walters ae50546ca6 Display API error information if available 2022-05-17 00:25:32 +10:00
Oliver Walters 1488a0e72f Adds a custom exception handler for DRF
- Handles common exceptions not captured by DRF
- Returns exeption data as a JSON object
2022-05-17 00:18:47 +10:00