Fix relation creation bug + enable favorite for custom objects (#3392)
* Fix relation creation bug * Fix vale CI * Fix comment bug
This commit is contained in:
@ -1,15 +1,7 @@
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
|
||||
export const getActivityTargetObjectFieldIdName = ({
|
||||
nameSingular,
|
||||
}: {
|
||||
nameSingular: string;
|
||||
}) => {
|
||||
const isCoreObject =
|
||||
nameSingular === CoreObjectNameSingular.Company ||
|
||||
nameSingular === CoreObjectNameSingular.Person;
|
||||
|
||||
const objectFieldIdName = `${!isCoreObject ? '_' : ''}${nameSingular}Id`;
|
||||
|
||||
return objectFieldIdName;
|
||||
return `${nameSingular}Id`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user