Well that wasn't clever of me

This commit is contained in:
2020-05-26 13:42:37 +01:00
parent 7356d020b2
commit 0bbc23853d
3 changed files with 4 additions and 3 deletions

View File

@@ -156,6 +156,6 @@ class GenericListView(generic.ListView):
object_list = self.model.objects.filter(filter)
orderBy = self.request.GET.get('orderBy', "name")
if orderBy is not "":
if orderBy != "":
object_list = object_list.order_by(orderBy)
return object_list

View File

@@ -262,7 +262,7 @@ class EventArchive(generic.ListView):
q = self.request.GET.get('q', "")
if q is not "":
if q != "":
qfilter = Q(name__icontains=q) | Q(description__icontains=q) | Q(notes__icontains=q)
# try and parse an int

View File

@@ -5,7 +5,7 @@ from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.select import Select
import datetime
from PyRIGS.regions import Modal
from PyRIGS.tests.regions import Modal
class Header(Region):
@@ -40,6 +40,7 @@ class ItemRow(Region):
def subtotal(self):
return self.find_element(*self._subtotal_locator).text
class ItemModal(Modal):
_header_selector = (By.TAG_NAME, 'h4')