def save(self): """ Save function to activate the given device once the device and user info have been validated. """ user = User.objects.get(email__exact=self.cleaned_data['user']) device = Device.objects.get(serial_number__exact=self.cleaned_data['device']) return DeviceManager.activate_device(device=device, user=user)
def save(self): """ Save function to activate the given device once the device and user info have been validated. """ user = User.objects.get(email__exact=self.cleaned_data['user']) device = Device.objects.get( serial_number__exact=self.cleaned_data['device']) return DeviceManager.activate_device(device=device, user=user)
def save(self): """ Overwritten save method to create new device using the device manager. """ return DeviceManager.create_device( serial_number=self.cleaned_data['serial_number'], sim_serial_number=self.cleaned_data['sim_serial_number'], date_manufactured=self.cleaned_data['date_manufactured'], phone_number=self.cleaned_data['phone_number'])
def save(self): """ Overwritten save method to create new device using the device manager. """ return DeviceManager.create_device ( serial_number = self.cleaned_data['serial_number'], sim_serial_number = self.cleaned_data['sim_serial_number'], date_manufactured = self.cleaned_data['date_manufactured'], phone_number = self.cleaned_data['phone_number'] )