Skip to content
Snippets Groups Projects
Commit d8f67898 authored by Nathanael Santoso's avatar Nathanael Santoso
Browse files

Update 20230314062152-course-flavor.sql

parent 333b250d
Branches
Tags
1 merge request!4Update 20230314062152-course-flavor.sql
Pipeline #57974 passed with stages
in 1 minute and 31 seconds
......@@ -15,7 +15,7 @@ CREATE OR REPLACE FUNCTION assign_lecturer()
RETURNS TRIGGER
AS $assign$
BEGIN
IF NEW.lecturer is NULL THEN
IF NEW.lecturer is NULL OR NEW.lecturer = '' THEN
NEW.lecturer = (SELECT name FROM public."user" WHERE email = NEW.email);
END IF;
RETURN NEW;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment