mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00

This mistake caused all of the container types to end up as either None or the actual instance itself, which was causing crashes. Contributes to issue CURA-6096.
20 lines
959 B
Python
20 lines
959 B
Python
from UM.Settings.SQLQueryFactory import SQLQueryFactory
|
|
from UM.Settings.DatabaseContainerMetadataController import DatabaseMetadataContainerController
|
|
from UM.Settings.InstanceContainer import InstanceContainer
|
|
|
|
|
|
class VariantDatabaseHandler(DatabaseMetadataContainerController):
|
|
"""The Database handler for Variant containers"""
|
|
|
|
def __init__(self):
|
|
super().__init__(SQLQueryFactory(table = "variants",
|
|
fields = {
|
|
"id": "text",
|
|
"name": "text",
|
|
"hardware_type": "text",
|
|
"definition": "text",
|
|
"version": "text",
|
|
"setting_version": "text"
|
|
}))
|
|
self._container_type = InstanceContainer
|