def verify(self, request, pk): nefarious_settings = self.queryset.get(id=pk) try: verify_settings_jackett(nefarious_settings) verify_settings_tmdb(nefarious_settings) verify_settings_transmission(nefarious_settings) except Exception as e: raise ValidationError(str(e)) return Response()
def verify_jackett_indexers(self, request, pk): nefarious_settings = self.queryset.get(id=pk) try: results = verify_settings_jackett(nefarious_settings) except Exception as e: raise ValidationError(str(e)) return Response(results.get('Indexers'))