Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.4.9 #2653

Merged
merged 24 commits into from
Dec 7, 2018
Merged

Release v2.4.9 #2653

merged 24 commits into from
Dec 7, 2018

Conversation

jeremystretch
Copy link
Member

Enhancements

  • #2089 - Add SONET interface form factors
  • #2495 - Enable deep-merging of config context data
  • #2597 - Add FibreChannel SFP28 (32GFC) interface form factor

Bug Fixes

  • #2400 - Correct representation of nested object assignment in API docs
  • #2576 - Correct type for count_* fields in site API representation
  • #2606 - Fixed filtering for interfaces with a virtual form factor
  • #2611 - Fix error handling when assigning a clustered device to a different site
  • #2613 - Decrease live search minimum characters to three
  • #2615 - Tweak live search widget to use brief format for API requests
  • #2623 - Removed the need to pass the model class to the rqworker process for webhooks
  • #2634 - Enforce consistent representation of unnamed devices in rack view

jeremystretch and others added 24 commits November 20, 2018 11:58
* Add constant for DB_MINIMUM_VERSION

* Refactor verify_postgresql_version to use Django connection pg_version method for comparing versions.

* Remove StrictVersion import

* Remove DB_MINIMUM_VERSION as not necessary in constants.

* Define DB_MINIMUM_VERSION locally to freeze to migration.

* Refactor database version verification to use django builtin methods.
* Fixes #2606 - Added MultipleChoiceFilter for form_factor

* Fixes #2606 - Add MultipleChoiceField for form_factor
Fixes error with too many lines.
* Fix tags field to be shown as array in API view

`tags` field in serializers is defineded as `TagListSerializerField`.
It should be shown as an array value in API view but actually, it is a
simple string value.

This fixes it by introducing a new `FieldInspector` to handle
`TagListSerializerField` type field as an array. It doesn't affects any
other type fields.

* Fix SerializedPKRelatedField type API expression

A field definded as `SerializedPKRelatedField` should be shown as an
array of child serializer objects in a response value definition in API
view but it is shown as an array of primary key values (usually
`integer` type) of a child serializer.

This fixes it by introducing a new `FieldInspector` to handle the field.
It doesn't affect any other type fields.

* Fix request parameter representation in API view

In API view, representation of a parameter defined as a sub class of
`WritableNestedSerializer` should be vary between a request and a
response. For example, `tenant` field in `IPAddressSerializer` should be
shown like following as a request body:

```
tenant: integer ...
```

while it should be shown like following as a response body:

```
tenant: {
    id: integer ...,
    url: string ...,
    name: string ...,
    slug: string ...
}
```

But in both cases, it is shown as a response body type expression. This
causes an error at sending an API request with that type value.

It is only an API view issue, API can handle a request if a request
parameter is structured as an expected request body by ignoring the
wrong expression.

This fixes the issue by replacing an implicitly used default auto schema
generator class by its sub class and returning a pseudo serializer with
'Writable' prefix at generating a request body. The reason to introduce
a new generator class is that there is no other point which can
distinguish a request and a response. It is not enough to distinguish
POST, PUT, PATCH methods from GET because former cases may return a JSON
object as a response but it is also represented as same as a request
body, causes another mismatch.

This also fixes `SerializedPKRelatedField` type field representation. It
should be shown as an array of primary keys in a request body.

Fixed #2400
Add reference to reinstalling the django-rq module
@jeremystretch jeremystretch merged commit bf00835 into master Dec 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants