Project

Profile

Help

Issue #1503

closed

remove Criteria import from serializers

Added by amacdona@redhat.com over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

There is a circular import problem, and the serializer really shouldn't need `pulp.server.db.model.criteria.Criteria`

The reason it is necessary right now is that the criteria needs to be translated from external to internal representation. `pulp/server/webservices/views/serializers/__init__.py:ModelSerializer.translate_criteria` should translate a dictionary representation of criteria and that dict should be used to create the `Criteria` object. Currently a `Criteria` object is created, it is converted to a dict, the dict is translated, and then the translated dict is used create a new `Criteria` object.


Related issues

Related to Pulp - Task #1578: Incoming searches should be translated by the modelCLOSED - WONTFIX

Actions

Also available in: Atom PDF