소스 검색

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)