we want to save a task which is beeing importable always as new database entry.
But we do not want to save RatingScale or RatingScaleItem, if equivalent elements are in database already.
If there is no RatingScale with the name in database, we save the deserialized_object, else we are reusing existent data.
If there is no RatingScaleItem with the same name for corresponding RatingScale in database, we save the deserialized_object, else we are reusing existent data.
The consequence is: If you where importing tasks from different praktomat instances having differences in names of RatingScaleItems but using same name for RatingScale, than these ScaleItems become merge into the same RatingScale.
we want to save a task which is beeing importable always as new database entry. But we do not want to save RatingScale or RatingScaleItem, if equivalent elements are in database already.
If there is no RatingScale with the name in database, we save the deserialized_object, else we are reusing existent data. If there is no RatingScaleItem with the same name for corresponding RatingScale in database, we save the deserialized_object, else we are reusing existent data.
The consequence is: If you where importing tasks from different praktomat instances having differences in names of RatingScaleItems but using same name for RatingScale, than these ScaleItems become merge into the same RatingScale.