Просмотр исходного кода

fix: handle optional user_group_ratio in LogsTable and render helper

CaIon 9 месяцев назад
Родитель
Сommit
58101328c5
2 измененных файлов с 2 добавлено и 3 удалено
  1. 1 2
      web/src/components/LogsTable.js
  2. 1 1
      web/src/helpers/render.js

+ 1 - 2
web/src/components/LogsTable.js

@@ -920,7 +920,6 @@ const LogsTable = () => {
                 other.completion_ratio,
                 other.model_price,
                 other.group_ratio,
-                other.user_group_ratio,
                 other.cache_ratio || 1.0,
                 other.cache_creation_ratio || 1.0,
               )
@@ -929,7 +928,7 @@ const LogsTable = () => {
                 other.completion_ratio,
                 other.model_price,
                 other.group_ratio,
-                other.user_group_ratio,
+                other?.user_group_ratio,
               ),
         });
       }

+ 1 - 1
web/src/helpers/render.js

@@ -448,8 +448,8 @@ export function renderLogContent(
   user_group_ratio,
   image = false,
   imageRatio = 1.0,
+  useUserGroupRatio = undefined
 ) {
-  const useUserGroupRatio = isValidGroupRatio(user_group_ratio);
   const ratioLabel = useUserGroupRatio ? i18next.t('专属倍率') : i18next.t('分组倍率');
   const ratio = useUserGroupRatio ? user_group_ratio : groupRatio;