Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
691ab0c
feat: support requests
Rotheem Apr 6, 2026
b9c0295
feat: support direct store transfer
Rotheem Apr 6, 2026
7c45db8
feat: migration and tests
Rotheem Apr 6, 2026
3b3b268
feat: apply suggestions
Rotheem Apr 6, 2026
4ce58f4
refacto: use schema
Rotheem Apr 6, 2026
38d920c
refacto : factorize schemas
Rotheem Apr 6, 2026
7fe4cd1
format
Rotheem Apr 6, 2026
9f6a4eb
refacto: add unique function
Rotheem Apr 6, 2026
b263f89
Add CoreAssociation relationship to stores
armanddidierjean Mar 1, 2026
9a9ae17
Migration
armanddidierjean Mar 1, 2026
7bcaa95
Don't print all image in migration 49 Compress images
armanddidierjean Mar 1, 2026
fc4812f
Lint
armanddidierjean Mar 1, 2026
d7ca8cf
Fix tests
armanddidierjean Mar 1, 2026
3113cf2
fixup
armanddidierjean Mar 21, 2026
860b499
fixup
armanddidierjean Mar 21, 2026
47b3be0
Migration rebase
armanddidierjean Mar 21, 2026
9b5d2b9
get_store_by_association_id
armanddidierjean Mar 27, 2026
c6f0e55
fix tests
armanddidierjean Mar 28, 2026
433bfbc
Fix tests
armanddidierjean Mar 28, 2026
85c8b7e
Lint
armanddidierjean Mar 28, 2026
e13fe9a
Unique constraint for CoreAssociation and Store relationship
armanddidierjean Mar 28, 2026
f7bb6d9
Unique constraint
armanddidierjean Mar 28, 2026
54ede67
lint
armanddidierjean Mar 28, 2026
495b666
Fix factories
armanddidierjean Mar 28, 2026
caa82d3
Optional association_id
armanddidierjean Apr 2, 2026
306fc06
fix
armanddidierjean Apr 2, 2026
28c68c6
Tickets
armanddidierjean Mar 25, 2026
15db31d
Migration
armanddidierjean Mar 27, 2026
4338031
Test tickets
armanddidierjean Mar 27, 2026
979b286
Schema cleaning
armanddidierjean Mar 29, 2026
fce4d1e
WIP
armanddidierjean Mar 29, 2026
5c36b71
Quota
armanddidierjean Mar 29, 2026
d356260
syntax fix
foucblg Mar 28, 2026
527a034
Fix
armanddidierjean Mar 29, 2026
6f9c440
Remove quota per checkout and user and sessions' endtime
armanddidierjean Mar 29, 2026
4161069
start_datetime
armanddidierjean Mar 29, 2026
6f6e4cb
fixup
armanddidierjean Mar 29, 2026
36ad32d
tickets_in_checkout and tickets_sold
armanddidierjean Mar 29, 2026
a5dcc57
admin
armanddidierjean Mar 29, 2026
1b8e34b
Mypayment: can_manage_events
armanddidierjean Mar 29, 2026
1d8d32f
Migration
armanddidierjean Mar 29, 2026
76aa91e
Permissions
armanddidierjean Mar 29, 2026
8c72c83
Lock
armanddidierjean Mar 29, 2026
546204a
Mypayment: can_manage_events, fixup
armanddidierjean Mar 29, 2026
a4f4f8a
Fix
armanddidierjean Mar 29, 2026
06999f4
Add tests
armanddidierjean Mar 29, 2026
2ea4343
Tests and fix
armanddidierjean Mar 30, 2026
dd7429a
/tickets/admin/store/{store_id}/events
armanddidierjean Mar 31, 2026
ce101e1
Questions
armanddidierjean Apr 6, 2026
803ae6f
Pass store_id to get_events_from_store
armanddidierjean Apr 6, 2026
52894cf
Fix tests
armanddidierjean Apr 6, 2026
4256bf2
feat : ticket in event
foucblg Apr 6, 2026
d091a21
fixup
armanddidierjean Apr 6, 2026
43dbac4
Lint and clean
armanddidierjean Apr 6, 2026
b6848df
Add disabled fields
armanddidierjean Apr 6, 2026
3ca3a33
Disable
armanddidierjean Apr 6, 2026
873ec1c
Ensure event is open to authorize checkout creation
armanddidierjean Apr 6, 2026
68c8404
Test disabled
armanddidierjean Apr 6, 2026
904d791
Fix create checkout test
armanddidierjean Apr 6, 2026
4cb8ec6
Edit Event, Session and Category
armanddidierjean Apr 6, 2026
f2bd4a7
Patch questions
armanddidierjean Apr 6, 2026
e9bf4a8
Pass NewsEdit to allow exclude unset when updating feed's news
armanddidierjean Apr 6, 2026
e0331fc
Refactorize: remove Tickets
armanddidierjean Apr 6, 2026
5d1695e
Migration
armanddidierjean Apr 6, 2026
94ee8ff
Utils check_answer_validity_and_calculate_price
armanddidierjean Apr 6, 2026
ceb5f66
Lint
armanddidierjean Apr 6, 2026
6519d5a
Lint
armanddidierjean Apr 6, 2026
881c911
Rebase migrations
armanddidierjean Apr 6, 2026
639b6d3
Payment link
armanddidierjean Apr 6, 2026
4fca01c
Fix payment
armanddidierjean Apr 7, 2026
53883d0
Mypayment callback
armanddidierjean Apr 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions app/core/associations/factory_associations.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,14 @@


class AssociationsFactory(Factory):
association_ids = [
uuid.uuid4(),
uuid.uuid4(),
uuid.uuid4(),
uuid.uuid4(),
]
association_ids = [uuid.uuid4() for _ in range(len(CoreGroupsFactory.groups_ids))]

depends_on = [CoreGroupsFactory]

@classmethod
async def create_associations(cls, db: AsyncSession):
descriptions = [
"Association 1",
"Association 2",
"Association 3",
"Association 4",
f"Association {i + 1}" for i in range(len(CoreGroupsFactory.groups_ids))
]
for i in range(len(CoreGroupsFactory.groups_ids)):
await cruds_associations.create_association(
Expand Down
4 changes: 2 additions & 2 deletions app/core/checkout/endpoints_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def webhook(
try:
for module in all_modules:
if module.root == checkout.module:
if module.payment_callback is None:
if module.checkout_callback is None:
hyperion_error_logger.info(
f"Payment: module {checkout.module} does not define a payment callback for checkout (hyperion_checkout_id: {checkout_metadata.hyperion_checkout_id}, HelloAsso checkout_id: {checkout.id})",
)
Expand All @@ -147,7 +147,7 @@ async def webhook(
paid_amount=checkout_payment_model.paid_amount,
checkout_id=checkout_payment_model.checkout_id,
)
await module.payment_callback(checkout_payment_schema, db)
await module.checkout_callback(checkout_payment_schema, db)
hyperion_error_logger.info(
f"Payment: call to module {checkout.module} payment callback for checkout (hyperion_checkout_id: {checkout_metadata.hyperion_checkout_id}, HelloAsso checkout_id: {checkout.id}) succeeded",
)
Expand Down
2 changes: 1 addition & 1 deletion app/core/checkout/payment_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async def init_checkout(
self._helloasso_slug,
init_checkout_body,
)
except UnauthorizedException, BadRequestException:
except (UnauthorizedException, BadRequestException):
# We know that HelloAsso may refuse some payer infos, like using the firstname "test"
# Even when prefilling the payer infos,the user will be able to edit them on the payment page,
# so we can safely retry without the payer infos
Expand Down
18 changes: 3 additions & 15 deletions app/core/feed/utils_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,7 @@ async def create_feed_news(
async def edit_feed_news(
module: str,
module_object_id: uuid.UUID,
title: str | None,
start: datetime | None,
end: datetime | None,
entity: str | None,
location: str | None,
action_start: datetime | None,
news_edit: schemas_feed.NewsEdit,
require_feed_admin_approval: bool,
db: AsyncSession,
notification_tool: NotificationTool,
Expand All @@ -103,14 +98,7 @@ async def edit_feed_news(
await cruds_feed.edit_news_by_module_object_id(
module=module,
module_object_id=module_object_id,
news_edit=schemas_feed.NewsEdit(
title=title,
start=start,
end=end,
entity=entity,
location=location,
action_start=action_start,
),
news_edit=news_edit,
db=db,
)
if require_feed_admin_approval:
Expand All @@ -123,7 +111,7 @@ async def edit_feed_news(
if require_feed_admin_approval:
message = Message(
title="🔔 Feed - a news has been modified",
content=f"{entity} has modified {title}",
content=f"{news_edit.entity} has modified {news_edit.title}",
action_module="feed",
)
permission = await cruds_permissions.get_permissions_by_permission_name(
Expand Down
28 changes: 20 additions & 8 deletions app/core/groups/factory_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,35 @@


class CoreGroupsFactory(Factory):
groups_ids = [
str(uuid.uuid4()),
str(uuid.uuid4()),
str(uuid.uuid4()),
str(uuid.uuid4()),
]
groups_ids = [str(uuid.uuid4()) for _ in range(10)]

depends_on = [CoreUsersFactory]

@classmethod
async def create_core_groups(cls, db: AsyncSession):
groups = ["BDE", "BDS", "Oui", "Pixels"]
groups = [
"BDE",
"BDS",
"Pixels",
"Commuz",
"Musique",
"Fablab",
"BDA",
"Fouquette",
"Soli",
"SDeC",
]
descriptions = [
"Bureau des élèves",
"Bureau des sports",
"Association d'entraide",
"Association de photographie",
"",
"",
"",
"",
"",
"",
"",
]
for i in range(len(groups)):
await cruds_groups.create_group(
Expand Down
6 changes: 3 additions & 3 deletions app/core/groups/groups_type.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum
from enum import StrEnum


class GroupType(str, Enum):
class GroupType(StrEnum):
"""
In Hyperion, each user may have multiple groups. Belonging to a group gives access to a set of specific permissions.
Expand All @@ -14,7 +14,7 @@ class GroupType(str, Enum):
admin = "0a25cb76-4b63-4fd3-b939-da6d9feabf28"


class AccountType(str, Enum):
class AccountType(StrEnum):
"""
Various account types that can be created in Hyperion.
Each account type is associated with a set of permissions.
Expand Down
Loading
Loading