瀏覽代碼

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)