admin: fix get_form_class
This commit is contained in:
parent
9724ded194
commit
760352202e
|
@ -167,6 +167,7 @@ class TestProviderSAML(SeleniumTestCase):
|
||||||
self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER)
|
self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER)
|
||||||
self.driver.find_element(By.ID, "id_password").send_keys(USER().username)
|
self.driver.find_element(By.ID, "id_password").send_keys(USER().username)
|
||||||
self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER)
|
self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER)
|
||||||
|
sleep(1)
|
||||||
self.wait_for_url("http://localhost:9009/")
|
self.wait_for_url("http://localhost:9009/")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.driver.find_element(By.CSS_SELECTOR, "pre").text,
|
self.driver.find_element(By.CSS_SELECTOR, "pre").text,
|
||||||
|
|
|
@ -43,7 +43,7 @@ class InheritanceCreateView(CreateAssignPermView):
|
||||||
)
|
)
|
||||||
except StopIteration as exc:
|
except StopIteration as exc:
|
||||||
raise Http404 from exc
|
raise Http404 from exc
|
||||||
return model.form(model)
|
return model().form
|
||||||
|
|
||||||
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
|
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
|
||||||
kwargs = super().get_context_data(**kwargs)
|
kwargs = super().get_context_data(**kwargs)
|
||||||
|
|
|
@ -163,7 +163,7 @@ class SAMLPropertyMapping(PropertyMapping):
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
name = self.friendly_name if self.friendly_name != "" else self.saml_name
|
name = self.friendly_name if self.friendly_name != "" else self.saml_name
|
||||||
return f"SAML Property Mapping {self.name} ({name})"
|
return f"{self.name} ({name})"
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
||||||
|
|
Reference in New Issue