MCPcopy Create free account
hub / github.com/explorerhq/sql-explorer / clean_database_connection

Method clean_database_connection

explorer/forms.py:55–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 return super().clean()
54
55 def clean_database_connection(self):
56 connection_id = self.cleaned_data.get("database_connection")
57 if connection_id:
58 try:
59 return DatabaseConnection.objects.get(id=connection_id)
60 except DatabaseConnection.DoesNotExist as e:
61 raise ValidationError("Invalid database connection selected.") from e
62 return None
63
64 @property
65 def created_at_time(self):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected