瀏覽代碼

fix Admin data view for Config to render both sections and individual values

Nick Sweeting 1 年之前
父節點
當前提交
59b669691f
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      archivebox/core/models.py
  2. 1 1
      archivebox/core/views.py

+ 2 - 0
archivebox/core/models.py

@@ -118,6 +118,8 @@ class Tag(ABIDModel):
     def api_docs_url(self) -> str:
         return '/api/v1/docs#/Core%20Models/api_v1_core_get_tag'
 
+
+
 class SnapshotTag(models.Model):
     id = models.AutoField(primary_key=True)
 

+ 1 - 1
archivebox/core/views.py

@@ -613,7 +613,7 @@ def live_config_value_view(request: HttpRequest, key: str, **kwargs) -> ItemCont
                 "fields": {
                     'Key': key,
                     'Type': find_config_type(key),
-                    'Value': settings.FLAT_CONFIG[key] if key_is_safe(key) else '********',
+                    'Value': settings.FLAT_CONFIG.get(key, settings.CONFIGS.get(key, None)) if key_is_safe(key) else '********',
                 },
                 "help_texts": {
                     'Key': mark_safe(f'''