Преглед на файлове

fix: RemoteRun — alias name/type/size_human pour compatibilité dashboard réseau

Cédric Hansen преди 22 часа
родител
ревизия
20fbc745ac
променени са 1 файла, в които са добавени 13 реда и са изтрити 0 реда
  1. 13 0
      sources/db.py

+ 13 - 0
sources/db.py

@@ -128,6 +128,19 @@ class RemoteRun(db.Model):
     last_archive_name = db.Column(db.Text)
     last_size_bytes = db.Column(db.Integer)
 
+    # Alias pour compatibilité avec le template dashboard_network
+    @property
+    def name(self):
+        return self.job_name
+
+    @property
+    def type(self):
+        return self.job_type
+
+    @property
+    def size_human(self):
+        return _size_human(self.last_size_bytes)
+
     @property
     def last_size_human(self):
         return _size_human(self.last_size_bytes)