def METHOD_NAME(self, validated_data: dict) -> Department:
    categorydepartment_set_validated_data = None
    if 'active_categorydepartment_set' in validated_data:
        categorydepartment_set_validated_data = validated_data.pop('active_categorydepartment_set')
    instance = super().METHOD_NAME(validated_data)
    if categorydepartment_set_validated_data:
        self._save_category_department(
            instance=instance,
            validated_data=categorydepartment_set_validated_data
        )
    instance.refresh_from_db()
    return instance