Ensure episode numbers are correctly formatted before updating video data
Fix: Correctly parse and submit episodeNumber as an integer in the updateMutation within the admin page's EditVideoDialog component to prevent potential data type mismatches. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 170e18f0-0f13-4eca-8643-546bba1dd8cc Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/170e18f0-0f13-4eca-8643-546bba1dd8cc/Zb44Vx1
This commit is contained in:
parent
f17747a814
commit
57c6462561
@ -266,7 +266,12 @@ function EditVideoDialog({
|
|||||||
|
|
||||||
const handleSubmit = (e: React.FormEvent) => {
|
const handleSubmit = (e: React.FormEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
updateMutation.mutate(formData);
|
// Convert episodeNumber to number if provided
|
||||||
|
const submitData = {
|
||||||
|
...formData,
|
||||||
|
episodeNumber: formData.episodeNumber ? parseInt(formData.episodeNumber.toString()) : null
|
||||||
|
};
|
||||||
|
updateMutation.mutate(submitData);
|
||||||
};
|
};
|
||||||
|
|
||||||
const generateAIDescription = async () => {
|
const generateAIDescription = async () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user