File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Services/Mentor/OJS.Services.Mentor.Business/Implementations Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ public static class FileExtensions
137
137
public const string TestOutputTxt = Output + Txt ;
138
138
public const string TestInputZip = Input + Zip ;
139
139
public const string TestOutputZip = Output + Zip ;
140
+
141
+ public static string WithoutLeadingDot ( string fileExtension ) => fileExtension . TrimStart ( '.' ) ;
140
142
}
141
143
142
144
public static class Submissions
Original file line number Diff line number Diff line change 25
25
using OpenAI ;
26
26
using OpenAI . Chat ;
27
27
using TiktokenSharp ;
28
- using static OJS . Common . GlobalConstants ;
28
+ using static OJS . Common . GlobalConstants . FileExtensions ;
29
29
using Table = DocumentFormat . OpenXml . Wordprocessing . Table ;
30
30
using static OJS . Common . GlobalConstants . Settings ;
31
31
@@ -583,8 +583,8 @@ private async Task<ConversationMessageModel> GetSystemMessage(ConversationReques
583
583
584
584
var wordFiles = problemsResources
585
585
. Where ( pr =>
586
- pr is { File : not null , FileExtension : FileExtensions . Docx } ||
587
- pr . Link is not null && pr . Link . Split ( '.' ) . Last ( ) . Equals ( FileExtensions . Docx , StringComparison . Ordinal ) )
586
+ ( pr . File is not null && pr . FileExtension ? . Equals ( WithoutLeadingDot ( Docx ) , StringComparison . Ordinal ) == true ) ||
587
+ ( pr . Link is not null && pr . Link . Split ( '.' ) . Last ( ) . Equals ( WithoutLeadingDot ( Docx ) , StringComparison . Ordinal ) ) )
588
588
. ToList ( ) ;
589
589
590
590
/*
You can’t perform that action at this time.
0 commit comments