File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
backend/infrahub/core/branch Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 66from pydantic import Field , field_validator
77
88from infrahub .core .branch .enums import BranchStatus
9- from infrahub .core .constants import (
10- GLOBAL_BRANCH_NAME ,
11- )
9+ from infrahub .core .constants import GLOBAL_BRANCH_NAME
10+ from infrahub .core .graph import GRAPH_VERSION
1211from infrahub .core .models import SchemaBranchHash # noqa: TC001
1312from infrahub .core .node .standard import StandardNode
1413from infrahub .core .query import QueryType
@@ -262,6 +261,10 @@ def get_branches_and_times_for_range(
262261
263262 return start , end
264263
264+ async def create (self , db : InfrahubDatabase ) -> bool :
265+ self .graph_version = GRAPH_VERSION
266+ return await super ().create (db = db )
267+
265268 async def delete (self , db : InfrahubDatabase ) -> None :
266269 if self .is_default :
267270 raise ValidationError (f"Unable to delete { self .name } it is the default branch." )
You can’t perform that action at this time.
0 commit comments