Open redshiftzero opened 4 years ago
I have (a) solution for this in https://github.com/lucyparsons/OpenOversight/pull/703. I have some time tonight and will try to get those unit tests written.
Actually, I misspoke. What I have is a scriptable way to add new departments, and to add new ranks to departments. Not anything to do with units.
If this still needs attention, I can take a look
Hi @brrusselburg! Yes, this would still be a useful cli command to have I think.
However, contrary to the description it should not have anything to do with csv files. Ideally it would be something like the job name import cli: https://github.com/lucyparsons/OpenOversight/blob/32df01195e4adc9fcc81a93c585b8cfe687f0143/OpenOversight/app/commands.py#L552
Except that the parameters would just be department_name
(not id) and unit_name
.
Hope that makes sense. Please let me know if you run into any issues
Allow bulk unit creation via the CLI. CSV has fields
unit_name, department_id
.Import should print
unit_id
(primary key when created),unit_name
,department_id
of successfully imported fields to stdout.This should go in: https://github.com/lucyparsons/OpenOversight/blob/develop/OpenOversight/app/commands.py