Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
  • Loading branch information
ruttenb committed Mar 4, 2024
1 parent 88c173b commit a0c58f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion history/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@

# A list of path prefixes the history middleware should ignore.
MIDDLEWARE_IGNORE = getattr(
settings, "HISTORY_MIDDLEWARE_IGNORE", [settings.STATIC_URL.lstrip('/'), settings.MEDIA_URL.lstrip('/')]
settings,
"HISTORY_MIDDLEWARE_IGNORE",
[settings.STATIC_URL.lstrip("/"), settings.MEDIA_URL.lstrip("/")],
)
12 changes: 6 additions & 6 deletions history/management/commands/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ def create_history_table(cursor, base_table, pk_name, pk_type):
"schema": conf.SCHEMA_NAME,
"table": history_table,
"role": conf.DB_ROLE,
"timestamp_type": "timestamp with time zone"
if conf.USE_TIMEZONES
else "timestamp",
"timestamp_type": (
"timestamp with time zone" if conf.USE_TIMEZONES else "timestamp"
),
"pk_name": pk_name,
"pk_type": pk_type,
"user_field": conf.USER_FIELD,
Expand Down Expand Up @@ -450,9 +450,9 @@ def create_trigger(cursor, trigger_type, table_name, pk_name, table_schema="publ
"history_user_field": conf.USER_FIELD,
"return": "OLD" if trigger_type == "delete" else "NEW",
"role": conf.DB_ROLE,
"timestamp_type": "timestamp with time zone"
if conf.USE_TIMEZONES
else "timestamp",
"timestamp_type": (
"timestamp with time zone" if conf.USE_TIMEZONES else "timestamp"
),
"user_type": conf.USER_TYPE,
"default_user": maybe_quote(conf.DEFAULT_USER),
"default_user_error": "true" if conf.DEFAULT_USER_ERROR else "false",
Expand Down

0 comments on commit a0c58f9

Please sign in to comment.