File tree 1 file changed +2
-2
lines changed
src/app/clusters/energy-calendar-server
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ CHIP_ERROR CalendarProvider::SetPeakPeriods(DataModel::Nullable<Structs::PeakPer
277
277
bool CalendarProvider::CheckPeriods (DataModel::List<Structs::CalendarPeriodStruct::Type> &periods)
278
278
{
279
279
uint32_t date = 0 ;
280
- VerifyOrReturnLogSend ((periods.size () > 0 || periods.size () <= 4 ), mEndpoint , " Periods list size must be from 1 to 4" );
280
+ VerifyOrReturnLogSend ((periods.size () > 0 && periods.size () <= 4 ), mEndpoint , " Periods list size must be from 1 to 4" );
281
281
for (auto & period : periods)
282
282
{
283
283
if (!period.startDate .IsNull ())
@@ -326,7 +326,7 @@ bool CalendarProvider::CheckDay(const Structs::DayStruct::Type & day)
326
326
VerifyOrReturnLogSend (!day.daysOfWeek .HasValue () || !day.date .HasValue (), mEndpoint ,
327
327
" Day can have only one value or DayOfWeek or Date" );
328
328
329
- VerifyOrReturnLogSend ((day.transitions .size () > 0 || day.transitions .size () <= 48 ), mEndpoint ,
329
+ VerifyOrReturnLogSend ((day.transitions .size () > 0 && day.transitions .size () <= 48 ), mEndpoint ,
330
330
" Day transinions list must have from 1 to 48 records" );
331
331
332
332
uint32_t time = 0 ;
You can’t perform that action at this time.
0 commit comments