mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
posprocessing hook for DRF
This commit is contained in:
@@ -58,7 +58,7 @@ export interface FoodInheritField {
|
||||
* @type {number}
|
||||
* @memberof FoodInheritField
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -77,7 +77,6 @@ export interface FoodInheritField {
|
||||
* Check if a given object implements the FoodInheritField interface.
|
||||
*/
|
||||
export function instanceOfFoodInheritField(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,7 +90,7 @@ export function FoodInheritFieldFromJSONTyped(json: any, ignoreDiscriminator: bo
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'field': json['field'] == null ? undefined : json['field'],
|
||||
};
|
||||
@@ -103,6 +102,7 @@ export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'field': value['field'],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user