https://github.com/inventree/InvenTree/pull/2717 (cherry picked from commit e8875d2e047ec31680f1b5a01933fd2369cc8bac)