fix operations e tasks
Some checks failed
Build and Release FLUX (Multi-Platform) / build-windows (push) Successful in 6m20s
Build and Release FLUX (Multi-Platform) / build-android (push) Failing after 11m52s
Build and Release FLUX (Multi-Platform) / build-web (push) Successful in 1m0s

This commit is contained in:
2026-06-04 13:42:29 +02:00
parent 4efc3ce182
commit 5ce0110197
11 changed files with 129 additions and 103 deletions

View File

@@ -30,7 +30,6 @@ class OperationModel extends Equatable {
final DateTime? createdAt;
final String type;
final String? subType;
final String? providerId;
final String? modelId;
final String? modelDisplayName;
final String? description;
@@ -60,7 +59,6 @@ class OperationModel extends Equatable {
this.createdAt,
this.type = '',
this.subType,
this.providerId,
this.modelId,
this.modelDisplayName,
this.description,
@@ -90,7 +88,6 @@ class OperationModel extends Equatable {
String? type,
String? subType,
// 🥷 TRUCCO APPLICATO ANCHE QUI:
String? Function()? providerId,
ProviderModel? Function()? provider,
String? modelId,
String? modelDisplayName,
@@ -118,7 +115,6 @@ class OperationModel extends Equatable {
type: type ?? this.type,
subType: subType ?? this.subType,
// Se la funzione è passata, la eseguiamo (anche se ritorna null), altrimenti teniamo il vecchio
providerId: providerId != null ? providerId() : this.providerId,
provider: provider != null ? provider() : this.provider,
modelId: modelId ?? this.modelId,
@@ -149,7 +145,6 @@ class OperationModel extends Equatable {
createdAt,
type,
subType,
providerId,
provider,
modelId,
modelDisplayName,
@@ -187,8 +182,6 @@ class OperationModel extends Equatable {
subType: map['sub_type'] as String?,
// I campi relazionali nullabili restano rigorosamente null!
providerId: map['provider_id'] as String?,
// MAGIA ANTI-CRASH: Usiamo ?['chiave'] per non far esplodere i join vuoti
provider: (map[Tables.providers] != null)
? ProviderModel.fromMap(map[Tables.providers] as Map<String, dynamic>)
: null,
@@ -243,7 +236,7 @@ class OperationModel extends Equatable {
if (id != null) 'id': id,
'type': type,
'sub_type': subType,
'provider_id': providerId,
'provider_id': provider?.id,
'model_id': modelId,
'description': description,
if (expirationDate != null)