Esempio n. 1
0
	def delete(self, request, machine, field, value, format=None):
		if field.lower()=='characteristics':
			characteristics = machine.characteristics.all()
		else:
			characteristics = machine.characteristics.get(characteristicType__iexact=field)
		characteristics.delete()
		return Response(status=status.HTTP_204_NO_CONTENT)
Esempio n. 2
0
 def delete(self, request, machine, field, value, format=None):
     if field.lower() == 'characteristics':
         characteristics = machine.characteristics.all()
     else:
         characteristics = machine.characteristics.get(
             characteristicType__iexact=field)
     characteristics.delete()
     return Response(status=status.HTTP_204_NO_CONTENT)