Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql,v
diff -u -N -r1.36 -r1.37
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql	7 Mar 2011 01:39:31 -0000	1.36
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql	7 Mar 2011 02:52:22 -0000	1.37
@@ -626,13 +626,14 @@
       v_package_name := p_package_name;
     end if;
 
-    if p_supertype is null or p_supertype = '''' then
-      v_supertype := ''acs_object'';
-    else
-      v_supertype := p_supertype;
-      if not acs_object_type__is_subtype_p(''acs_object'', p_supertype)
-      then
-        raise exception ''%s is not a valid type'', p_supertype;
+    if p_object_type <> ''acs_object'' then
+      if p_supertype is null or p_supertype = '''' then
+        v_supertype := ''acs_object'';
+      else
+        v_supertype := p_supertype;
+        if not acs_object_type__is_subtype_p(''acs_object'', p_supertype) then
+          raise exception ''%s is not a valid type'', p_supertype;
+        end if;
       end if;
     end if;
 
