Skip to content

Commit

Permalink
fix decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Jan 18, 2024
1 parent 0fc312d commit c25043e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/releases/wq.db-2.0.0a1.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ wq.db.rest now provides a top-level `@register` decorator that directly mimics t
from wq.db import rest
from .models import MyModel

[@rest](https://github.com/rest).register(MyModel, url="customurl")
@rest.register(MyModel, url="customurl")
class MyCustomSerializer(rest.ModelSerializer)
class Meta:
wq_field_config = {...}
Expand Down Expand Up @@ -59,7 +59,7 @@ class ChildSerializer(rest.ModelSerializer):
class Meta:
model = ChildModel

[@rest](https://github.com/rest).register(ParentModel)
@rest.register(ParentModel)
class ParentSerializer(rest.ModelSerializer):
children = ChildSerializer(
many=True,
Expand Down
4 changes: 1 addition & 3 deletions docs/update_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def link_commit(match):

def link_users(body):
def link_user(match):
if match[0] in ("@wq", "@index", "@register"):
if match[0] in ("@wq", "@index", "@rest", "@register"):
return match[0]
return f"[{match[0]}](https://github.com/{match[1]})"

Expand Down Expand Up @@ -299,8 +299,6 @@ def process_repo(repo_name):
date = release["published_at"].split("T")[0]
try:
body = update_body(release["body"], repo_name)
if tag == "0.7.z":
raise Exception("HERE")
except Exception as e:
print("#" * 80)
print(f"Error while processing {repo_name} {tag}:")
Expand Down

0 comments on commit c25043e

Please sign in to comment.