docs: fixes for breaking a poem to two poems issues
This commit is contained in:
parent
237d6b0c82
commit
5b827703cd
@ -25,6 +25,9 @@ namespace RMuseum.Services.Implementation
|
||||
}
|
||||
var dbMainPoem = await context.GanjoorPoems.Include(p => p.GanjoorMetre).Where(p => p.Id == poemId).SingleOrDefaultAsync();
|
||||
|
||||
if(dbMainPoem.Title.IndexOf(poemTitleStaticPart) != 0)
|
||||
return new RServiceResult<int>(-1, $"dbMainPoem.Title.IndexOf(poemTitleStaticPart) != 0");
|
||||
|
||||
if (!int.TryParse(dbMainPoem.UrlSlug.Substring("sh".Length), out int mainPoemSlugNumber))
|
||||
return new RServiceResult<int>(-1, $"slug error for the last poem in the category: {dbMainPoem.UrlSlug}");
|
||||
|
||||
|
||||
@ -2496,7 +2496,12 @@ namespace RMuseum.Services.Implementation
|
||||
var job = (await jobProgressServiceEF.NewJob($"Breaking poem {poem.FullTitle}", "Query data")).Result;
|
||||
try
|
||||
{
|
||||
await _BreakPoemAsync(context, poemId, vOrder, userId, poem, parentPage, poemTitleStaticPart);
|
||||
var res = await _BreakPoemAsync(context, poemId, vOrder, userId, poem, parentPage, poemTitleStaticPart);
|
||||
if(!string.IsNullOrEmpty(res.ExceptionString))
|
||||
{
|
||||
await jobProgressServiceEF.UpdateJob(job.Id, 100, "", false, res.ExceptionString);
|
||||
}
|
||||
|
||||
await jobProgressServiceEF.UpdateJob(job.Id, 100, "", true);
|
||||
}
|
||||
catch (Exception exp)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user