City-of-Bloomington / uReport

Issue tracking and constituent relationship management system with an Open311 (GeoReport v2) endpoint designed for local governments
https://bloomington.in.gov/crm
GNU Affero General Public License v3.0
41 stars 29 forks source link

Cannot edit departments during initial setup #384

Closed inghamn closed 3 years ago

inghamn commented 3 years ago

During initial setup, the department screens do not work. The error is because of the interrelatedness of Person-Department-Category.

Fatal error: Uncaught TypeError: Argument 1 passed to Application\Models\Category::setDepartment() must be an instance of Application\Models\Department, null given, called in /srv/sites/ureport/src/Application/Models/Category.php on line 59 and defined in /srv/sites/ureport/src/Application/Models/Category.php:141 Stack trace: #0 /srv/sites/ureport/src/Application/Models/Category.php(59): Application\Models\Category->setDepartment() #1 /srv/sites/ureport/src/Application/TableGateway.php(31): Application\Models\Category->construct() #2 /srv/sites/ureport/src/Application/Models/CategoryTable.php(15): Application\TableGateway->construct() #3 /srv/sites/ureport/src/Application/Models/Department.php(158): Application\Models\CategoryTable->__construct() #4 /srv/sites/ureport/blocks/html/departments/departmentInfo.inc(40): Application\Models\Department->getCategories() #5 /srv/sites/ureport/vendor/City-of-Bloomington/blossom-lib/src/Classes/Block.php(75): include('/srv/sites/urep...') #6 /srv/sites/ureport/vendor/City-of-Bloo in /srv/sites/ureport/src/Application/Models/Category.php on line 141

To work around this problem, make sure: