Skip to content

Commit f7e472c

Browse files
committed
Implement some PR review suggestions
1 parent fc78f17 commit f7e472c

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

src/euphorie/client/navigation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def FindNextQuestion(after, dbsession, filter=None):
4141
model.Choice.id == model.SurveyTreeItem.id,
4242
sql.or_(
4343
model.Choice.condition == None, # noqa: E711
44-
model.Choice.condition.like(model.Option.zodb_path),
44+
model.Choice.condition == model.Option.zodb_path, # noqa: E711
4545
),
4646
),
4747
),
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
from ..option import IOption
22
from ..utils import DragDropHelper
3-
from Acquisition import aq_inner
43
from plone.dexterity.browser.view import DefaultView
5-
from plone.memoize.instance import memoize
64

75

86
class ChoiceView(DefaultView, DragDropHelper):
9-
@property
10-
@memoize
11-
def my_context(self):
12-
return aq_inner(self.context)
13-
147
@property
158
def options(self):
169
return [
@@ -19,6 +12,6 @@ def options(self):
1912
"url": option.absolute_url(),
2013
"title": option.title,
2114
}
22-
for option in self.my_context.values()
15+
for option in self.context.values()
2316
if IOption.providedBy(option)
2417
]

src/euphorie/upgrade/content/v1/20250402124248_add_content_type__choice/types.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<object meta_type="Conditional Dexterity FTI"
44
name="euphorie.choice"
55
/>
6-
<object meta_type="Conditional Dexterity FTI"
6+
<object meta_type="Dexterity FTI"
77
name="euphorie.option"
88
/>
99
<object meta_type="Conditional Dexterity FTI"

src/euphorie/upgrade/content/v1/20250402124248_add_content_type__choice/types/euphorie.choice.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
3-
meta_type="Dexterity FTI"
3+
meta_type="Conditional Dexterity FTI"
44
name="euphorie.choice"
55
i18n:domain="euphorie"
66
>

0 commit comments

Comments
 (0)