fix: statusable
This commit is contained in:
		
							parent
							
								
									797da5bdb0
								
							
						
					
					
						commit
						1b3e7993fb
					
				@ -62,7 +62,13 @@ export const getInfo = async (ctx: actions.Context, next) => {
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  if (view && view.type === 'form') {
 | 
			
		||||
    const statusable = !!ctx.db.getTable(view.collection_name).getField('status');
 | 
			
		||||
    const count = await Field.count({
 | 
			
		||||
      where: {
 | 
			
		||||
        name: 'status',
 | 
			
		||||
        collection_name: view.collection_name,
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
    const statusable = !!count;//!!ctx.db.getTable(view.collection_name).getField('status');
 | 
			
		||||
    if (statusable) {
 | 
			
		||||
      view.setDataValue('statusable', statusable);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user