If you get an unhandled exception error such as the one below when importing a backup job into Cubit that has been provided by another user, then it is most likely that group code name used in the job already exists in your Cubit software.
Cubit Unhandled Exception Error:
System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> Npgsql.PostgresException: 23505: duplicate key value violates unique constraint "groupcodes_groupcode_key"
To resolve this you can do the following:
- Rename the duplicate code group in your software.
- Import the job. This will recreate the code group in the software with the appropriate ID in the data to prevent this issue recurring. However, the code group that is created will be blank.
- Get a copy of the code group as a CSV file from the estimator that sent the job, and import this into the new code group on your system.
Once this has been done, any other jobs received from the second estimator using this code group will import without trouble.
Should you continue to experience a problem in using Cubit even after performing the above steps, Please Submit a Support Ticket