Skip to content

Commit

Permalink
This is just worng
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Jan 2, 2025
1 parent 96d4bce commit 541abe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/campus/period.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (c *Campuser) GetAcademicYear(ctx context.Context, t time.Time) (AcademicYe
ay.Year = t.Year()

err := c.db.SelectContext(ctx, &ay.TeachingCycle, `
SELECT teaching_period_id, period.year, name, start finish
SELECT period_id, period.year, name, start, finish
FROM misc.teaching_periods period
INNER JOIN (
SELECT year
Expand All @@ -66,7 +66,7 @@ func (c *Campuser) GetAcademicYear(ctx context.Context, t time.Time) (AcademicYe
func (c *Campuser) GetTeachingPeriod(ctx context.Context, t time.Time) (TeachingPeriod, error) {
tp := TeachingPeriod{}
err := c.db.GetContext(ctx, &tp, `
SELECT teaching_period_id, year, name, start, finish
SELECT period_id, year, name, start, finish
FROM misc.teaching_periods
WHERE $1 BETWEEN start AND finish;`, t)
if err != nil {
Expand Down

0 comments on commit 541abe8

Please sign in to comment.