Prechádzať zdrojové kódy

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

Cédric Hansen 22 hodín pred
rodič
commit
20fbc745ac
1 zmenil súbory, kde vykonal 13 pridanie a 0 odobranie
  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)