* [bug#52397] fix ai prompt failed to redirect to epic change method.

This commit is contained in:
liwenrui
2024-07-09 10:43:06 +08:00
committed by 李文睿
parent 3c0e931b17
commit 1ece5fea4e
+2 -1
View File
@@ -2258,8 +2258,9 @@ class aiModel extends model
}
$linkVars = vsprintf($varsConfig->format, $vars);
/* Override method for story drafts. */
/* Overrides for stories. */
if($module == 'story' && $method == 'change' && !empty($object->story) && $object->story->status == 'draft') $method = 'edit';
if($module == 'story' && $method == 'change' && !empty($object->story) && $object->story->type == 'epic') $module = 'epic';
return array(helper::createLink($module, $method, $linkVars) . (empty($varsConfig->app) ? '' : "#app=$varsConfig->app"), false);
}