Ticket #2915 (new refactor)

Opened 20 months ago

Last modified 20 months ago

Refactor form_to_db_schema_options()

Reported by: seanh Owned by:
Priority: awaiting triage Milestone: ckan 2.0
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description (last modified by seanh) (diff)

Having two methods form_to_db_schema(self) and form_to_db_schema_options(self, options) seems unnecessary, why not just have form_to_db_schema(self, options=None)?

Fixing this might break existing extensions although I don't think any are using form_to_db_schema_options() so it should be okay.

The same thing goes for db_to_form_schema_options().

Also why are we passing a dict 'options' that always contains the same three keys 'api', 'context' and 'type'? Why not three params api=None, contenxt=None, type=None?

Change History

comment:1 Changed 20 months ago by seanh

  • Description modified (diff)

comment:2 Changed 20 months ago by seanh

  • Description modified (diff)
Note: See TracTickets for help on using tickets.